CoinConflictGraph

Base class for Conflict Graph: a conflict graph is a structure that stores conflicts between binary variables.

Base class for Conflict Graph: a conflict graph is a structure that stores conflicts between binary variables.

Derived classes: CoinDynamicConflictGraph, CoinStaticConflictGraph

Description

These conflicts can involve the original problem variables or complementary variables.

Public Methods

CoinConflictGraph

 CoinConflictGraph()

CoinConflictGraph

Default constructor.

 CoinConflictGraph(size_t _size)

Parameters:

CoinConflictGraph

Default constructor.

 CoinConflictGraph(const CoinConflictGraph * other)

Parameters:

~CoinConflictGraph

Destructor.

 ~CoinConflictGraph()

conflicting

Checks for conflicts between two nodes.

bool conflicting(size_t n1, size_t n2)

Parameters:

Returns: true if there is an edge between n1 and n2 in the conflict graph, 0 otherwise.

conflictingNodes

Queries all nodes conflicting with a given node.

std::pair< size_t, const size_t * > conflictingNodes(size_t node, size_t * temp, char * iv)

Parameters:

Returns: pair containing (number of conflicting nodes, array of conflicting nodes), the array may be a pointer to temp if the temporary storage area was used or a pointer to an array in the conflict graph itself.

density

Density of the conflict graph: (nConflicts / maxConflicts)

double density()

size

Number of nodes in the conflict graph.

size_t size()

degree

Degree of a given node.

size_t degree(const size_t node)

Parameters:

modifiedDegree

Modified degree of a given node.

size_t modifiedDegree(const size_t node)

Parameters:

minDegree

Minimum node degree.

size_t minDegree()

maxDegree

Maximum node degree.

size_t maxDegree()

nCliques

Number of cliques stored explicitly.

size_t nCliques()

cliqueSize

Size of the i-th clique stored explicitly.

size_t cliqueSize(size_t idxClique)

Parameters:

cliqueElements

Contents of the i-th clique stored explicitly.

const size_t * cliqueElements(size_t idxClique)

Parameters:

nNodeCliques

Return how many explicit cliques a node appears.

size_t nNodeCliques(size_t idxClique)

Parameters:

nodeCliques

Return which cliques a node appears.

const size_t * nodeCliques(size_t idxClique)

Parameters:

nDirectConflicts

Return the number of pairwise conflicts stored for a node.

size_t nDirectConflicts(size_t idxNode)

Parameters:

directConflicts

List of pairwise conflicts (not stored as cliques) for a node.

const size_t * directConflicts(size_t idxNode)

Parameters:

recomputeDegree

Recompute the degree of each node of the graph.

void recomputeDegree()

computeModifiedDegree

Recompute the modified degree of each node of the graph.

void computeModifiedDegree()

nTotalDirectConflicts

Total number of conflicts stored directly.

size_t nTotalDirectConflicts()

nTotalCliqueElements

Total number of clique elements stored.

size_t nTotalCliqueElements()

printSummary

Print summarized information about the conflict graph.

void printSummary()

setMinCliqueRow

Set the the minimum size of a clique to be explicitly stored as a clique (not pairwise).

void setMinCliqueRow(size_t minClqRow)

Parameters:

getMinCliqueRow

Return the the minimum size of a clique to be explicitly stored as a clique (not pairwise).

size_t getMinCliqueRow()

Source

Header: layer-0/CoinUtils/src/CoinConflictGraph.hpp