GRATgen
|
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. | |
ClauseDB & | operator= (ClauseDB const &x) |
Assignment operator, copies the clause database. | |
lit_t * | p2c (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_t & | clw1 (lit_t *cl) |
Get the first watched literal of a clause. More... | |
lit_t & | clw2 (lit_t *cl) |
Get the second watched literal of a clause. More... | |
Stores the clauses and the certificate as an array of cdb_t items.
|
inline |
Appends a literal to the clause database.
This invalidates all pointers and iterators, but preserves relative positions.
|
inline |
Get a const reference to the internal vector storing the data.
Converts a relative position to a pointer into the current data.
Converts a relative position into an iterator.
|
inline |
Remove everything from (including) the specified positon onwards.
|
related |
Get the id of a clause.
Get the first watched literal of a clause.
Get the second watched literal of a clause.