GRATgen
Public Member Functions | Related Functions | List of all members
ClauseDB Class Reference

Stores the clauses and the certificate as an array of cdb_t items. More...

Public Member Functions

 ClauseDB (ClauseDB const &x)
 Copies the clause database.
 
ClauseDBoperator= (ClauseDB const &x)
 Assignment operator, copies the clause database.
 
lit_tp2c (pos_t pos)
 Converts a relative position to a pointer into the current data.
 
lit_t const * p2c (pos_t pos) const
 Converts a relative position to a pointer into the current data. More...
 
vector< cdb_t >::iterator p2i (pos_t pos)
 Converts a relative position into an iterator.
 
vector< cdb_t >::const_iterator p2i (pos_t pos) const
 Converts a relative position into an iterator. More...
 
pos_t c2p (lit_t *cl) const
 Converts a pointer into a relative position.
 
pos_t current () const
 Get the relative position of the next item to be added to the database.
 
void append (lit_t l)
 Appends a literal to the clause database. More...
 
void shrink_to (pos_t pos)
 Remove everything from (including) the specified positon onwards.
 
void shrink_to (vector< cdb_t >::iterator end)
 Remove everything from (including) the specified positon onwards. More...
 
vector< cdb_t > const & get_db () const
 Get a const reference to the internal vector storing the data.
 
vector< cdb_t > & get_db ()
 Get a const reference to the internal vector storing the data. More...
 

Related Functions

(Note that these are not member functions.)

size_t clid (lit_t *cl)
 Get the id of a clause. More...
 
lit_tclw1 (lit_t *cl)
 Get the first watched literal of a clause. More...
 
lit_tclw2 (lit_t *cl)
 Get the second watched literal of a clause. More...
 

Detailed Description

Stores the clauses and the certificate as an array of cdb_t items.

Member Function Documentation

◆ append()

void ClauseDB::append ( lit_t  l)
inline

Appends a literal to the clause database.

This invalidates all pointers and iterators, but preserves relative positions.

◆ get_db()

vector<cdb_t>& ClauseDB::get_db ( )
inline

Get a const reference to the internal vector storing the data.

◆ p2c()

lit_t const* ClauseDB::p2c ( pos_t  pos) const
inline

Converts a relative position to a pointer into the current data.

◆ p2i()

vector<cdb_t>::const_iterator ClauseDB::p2i ( pos_t  pos) const
inline

Converts a relative position into an iterator.

◆ shrink_to()

void ClauseDB::shrink_to ( vector< cdb_t >::iterator  end)
inline

Remove everything from (including) the specified positon onwards.

Friends And Related Function Documentation

◆ clid()

size_t clid ( lit_t cl)
related

Get the id of a clause.

See also
Internal storage of clauses

◆ clw1()

lit_t & clw1 ( lit_t cl)
related

Get the first watched literal of a clause.

See also
Internal storage of clauses

◆ clw2()

lit_t & clw2 ( lit_t cl)
related

Get the second watched literal of a clause.

See also
Internal storage of clauses

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