SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
smtrat::cad::ConflictGraph Class Reference

Representation of a bipartite graph (C+S, E) of vertices C and S, representing the constraints and samples, respectively. More...

#include <ConflictGraph.h>

Collaboration diagram for smtrat::cad::ConflictGraph:

Public Member Functions

 ConflictGraph (std::size_t constraints)
 
std::size_t coveredSamples (std::size_t id) const
 
void addSample (const Sample &sample)
 
std::size_t getMaxDegreeConstraint () const
 Retrieves the constraint that covers the most samples. More...
 
void selectConstraint (std::size_t id)
 Removes the given constraint and disable all sample points covered by this constraint. More...
 
std::vector< size_t > selectEssentialConstraints ()
 Selects all essential constraints and returns their indices. More...
 
ConflictGraph removeDuplicateColumns ()
 Returns a new ConflictGraph whose adjacency matrix consists only of the unique columns of the adjacency matrix of this graph. More...
 
bool hasRemainingSamples () const
 Checks if there are samples still uncovered. More...
 
std::size_t numSamples () const
 
std::size_t numRemainingConstraints () const
 
carl::Bitset getData (std::size_t id)
 
std::vector< std::pair< std::size_t, carl::Bitset > > getRemainingConstraints ()
 

Private Attributes

std::vector< carl::Bitset > mData
 Stores for each constraints, which sample points violate the constraint. More...
 
std::size_t mNextSID = 0
 

Friends

std::ostream & operator<< (std::ostream &os, const ConflictGraph &cg)
 

Detailed Description

Representation of a bipartite graph (C+S, E) of vertices C and S, representing the constraints and samples, respectively.

A vertex from C and a vertex from S are connected by an edge in E iff the corresponding constraint conflicts with the corresponding sample point.

Definition at line 23 of file ConflictGraph.h.

Constructor & Destructor Documentation

◆ ConflictGraph()

smtrat::cad::ConflictGraph::ConflictGraph ( std::size_t  constraints)
inline

Definition at line 31 of file ConflictGraph.h.

Member Function Documentation

◆ addSample()

void smtrat::cad::ConflictGraph::addSample ( const Sample sample)

Definition at line 7 of file ConflictGraph.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coveredSamples()

std::size_t smtrat::cad::ConflictGraph::coveredSamples ( std::size_t  id) const
inline

Definition at line 32 of file ConflictGraph.h.

Here is the caller graph for this function:

◆ getData()

carl::Bitset smtrat::cad::ConflictGraph::getData ( std::size_t  id)

Definition at line 112 of file ConflictGraph.cpp.

◆ getMaxDegreeConstraint()

std::size_t smtrat::cad::ConflictGraph::getMaxDegreeConstraint ( ) const

Retrieves the constraint that covers the most samples.

Definition at line 18 of file ConflictGraph.cpp.

◆ getRemainingConstraints()

std::vector< std::pair< std::size_t, carl::Bitset > > smtrat::cad::ConflictGraph::getRemainingConstraints ( )

Definition at line 116 of file ConflictGraph.cpp.

◆ hasRemainingSamples()

bool smtrat::cad::ConflictGraph::hasRemainingSamples ( ) const

Checks if there are samples still uncovered.

Definition at line 89 of file ConflictGraph.cpp.

◆ numRemainingConstraints()

std::size_t smtrat::cad::ConflictGraph::numRemainingConstraints ( ) const

Definition at line 104 of file ConflictGraph.cpp.

◆ numSamples()

std::size_t smtrat::cad::ConflictGraph::numSamples ( ) const

Definition at line 96 of file ConflictGraph.cpp.

Here is the caller graph for this function:

◆ removeDuplicateColumns()

ConflictGraph smtrat::cad::ConflictGraph::removeDuplicateColumns ( )

Returns a new ConflictGraph whose adjacency matrix consists only of the unique columns of the adjacency matrix of this graph.

Definition at line 63 of file ConflictGraph.cpp.

Here is the call graph for this function:

◆ selectConstraint()

void smtrat::cad::ConflictGraph::selectConstraint ( std::size_t  id)

Removes the given constraint and disable all sample points covered by this constraint.

Definition at line 32 of file ConflictGraph.cpp.

Here is the caller graph for this function:

◆ selectEssentialConstraints()

std::vector< std::size_t > smtrat::cad::ConflictGraph::selectEssentialConstraints ( )

Selects all essential constraints and returns their indices.

Definition at line 40 of file ConflictGraph.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const ConflictGraph cg 
)
friend

Definition at line 133 of file ConflictGraph.cpp.

Field Documentation

◆ mData

std::vector<carl::Bitset> smtrat::cad::ConflictGraph::mData
private

Stores for each constraints, which sample points violate the constraint.

Definition at line 28 of file ConflictGraph.h.

◆ mNextSID

std::size_t smtrat::cad::ConflictGraph::mNextSID = 0
private

Definition at line 29 of file ConflictGraph.h.


The documentation for this class was generated from the following files: