CoinDynamicConflictGraph
This a a conflict graph where conflicts can be added on the fly, not optimized for memory usage.
This a a conflict graph where conflicts can be added on the fly, not optimized for memory usage.
Inheritance
Inherits from: CoinConflictGraph
Public Methods
CoinDynamicConflictGraph
Default constructor.
CoinDynamicConflictGraph(size_t _size)
Parameters:
_size(size_t) - number of vertices of the conflict graph
CoinDynamicConflictGraph
Creates a conflict graph from a MILP.
CoinDynamicConflictGraph(const int numCols, const char * colType, const double * colLB, const double * colUB, const CoinPackedMatrix * matrixByRow, const char * sense, const double * rowRHS, const double * rowRange)
Parameters:
numCols(const int) - number of variablescolType(const char *) - column typescolLB(const double *) - column lower boundscolUB(const double *) - column upper boundsmatrixByRow(const CoinPackedMatrix *) - row-wise constraint matrixsense(const char *) - row senserowRHS(const double *) - row right hand siderowRange(const double *) - row ranges
~CoinDynamicConflictGraph
Destructor.
~CoinDynamicConflictGraph()
addNodeConflicts
Add conflicts to a node to be stored directly (not as cliques).
void addNodeConflicts(const size_t node, const size_t nodeConflicts, const size_t nConflicts)
Parameters:
node(const size_t) - indexnodeConflicts(const size_t) - conflicts to be addednConflicts(const size_t) - number of conflicts to be added
addClique
Add a clique (it will be stored explicitly as a clique).
void addClique(size_t size, const size_t elements)
Parameters:
size(size_t)elements(const size_t)
nCliques
Return the number of cliques stored explicitly.
size_t nCliques()
cliqueElements
Return the contents of the i-th clique stored explicitly.
const size_t * cliqueElements(size_t idxClique)
Parameters:
idxClique(size_t)
cliqueSize
Return the size of the i-th clique stored explicitly.
size_t cliqueSize(size_t idxClique)
Parameters:
idxClique(size_t)
nNodeCliques
Return how many explicit cliques a node appears.
size_t nNodeCliques(size_t idxNode)
Parameters:
idxNode(size_t)
nodeCliques
Return which cliques a node appears.
const size_t * nodeCliques(size_t idxNode)
Parameters:
idxNode(size_t)
degree
Return the degree of a given node.
size_t degree(const size_t node)
Parameters:
node(const size_t)
modifiedDegree
Return the modified degree of a given node.
size_t modifiedDegree(const size_t node)
Parameters:
node(const size_t)
nTotalCliqueElements
Total number of clique elements stored.
size_t nTotalCliqueElements()
nDirectConflicts
Return the number of pairwise conflicts stored for a node.
size_t nDirectConflicts(size_t idxNode)
Parameters:
idxNode(size_t)
directConflicts
List of pairwise conflicts (not stored as cliques) for a node.
const size_t * directConflicts(size_t idxNode)
Parameters:
idxNode(size_t)
nTotalDirectConflicts
Total number of conflicts stored directly.
size_t nTotalDirectConflicts()
addCliqueAsNormalConflicts
Add a clique as pairwise conflicts.
void addCliqueAsNormalConflicts(const size_t idxs, const size_t len)
Parameters:
idxs(const size_t)len(const size_t)
updatedBounds
Recommended tighter bounds for some variables.
const std::vector< std::pair< size_t, std::pair< double, double > > > & updatedBounds()
Returns: a vector of updated bounds with the format (idx, (lb, ub))
printInfo
Print information about the conflict graph.
void printInfo()
Source
Header: layer-0/CoinUtils/src/CoinDynamicConflictGraph.hpp