An array of literals that can be shared between threads. More...
#include <clause.h>
Public Member Functions | |
const Literal * | begin () const |
Returns a pointer to the beginning of the literal array. | |
const Literal * | end () const |
Returns a pointer to the end of the literal array. | |
uint32 | refCount () const |
void | release () |
SharedLiterals * | share () |
uint32 | simplify (Solver &s) |
Simplifies the literals w.r.t to the assignment in s. | |
uint32 | size () const |
Returns the number of literals in the array. | |
ConstraintType | type () const |
Returns the type of constraint from which the literals originated. | |
bool | unique () const |
Static Public Member Functions | |
static SharedLiterals * | newShareable (const LitVec &lits, ConstraintType t, uint32 numRefs=1) |
Creates a shareable (ref-counted) object containing the literals in lits. | |
static SharedLiterals * | newShareable (const Literal *lits, uint32 size, ConstraintType t, uint32 numRefs=1) |
Private Member Functions | |
void | destroy () |
SharedLiterals & | operator= (const SharedLiterals &) |
SharedLiterals (const Literal *lits, uint32 size, ConstraintType t, uint32 numRefs) | |
SharedLiterals (const SharedLiterals &) | |
Private Attributes | |
Literal | lits_ [0] |
Clasp::atomic< int32 > | refCount_ |
uint32 | size_type_ |
Clasp::SharedLiterals::SharedLiterals | ( | const Literal * | lits, |
uint32 | size, | ||
ConstraintType | t, | ||
uint32 | numRefs | ||
) | [private] |
Definition at line 61 of file clause.cpp.
Clasp::SharedLiterals::SharedLiterals | ( | const SharedLiterals & | ) | [private] |
const Literal* Clasp::SharedLiterals::begin | ( | ) | const [inline] |
void Clasp::SharedLiterals::destroy | ( | ) | [private] |
const Literal* Clasp::SharedLiterals::end | ( | ) | const [inline] |
static SharedLiterals* Clasp::SharedLiterals::newShareable | ( | const LitVec & | lits, |
ConstraintType | t, | ||
uint32 | numRefs = 1 |
||
) | [inline, static] |
SharedLiterals * Clasp::SharedLiterals::newShareable | ( | const Literal * | lits, |
uint32 | size, | ||
ConstraintType | t, | ||
uint32 | numRefs = 1 |
||
) | [static] |
Definition at line 56 of file clause.cpp.
SharedLiterals& Clasp::SharedLiterals::operator= | ( | const SharedLiterals & | ) | [private] |
uint32 Clasp::SharedLiterals::refCount | ( | ) | const [inline] |
void Clasp::SharedLiterals::release | ( | ) |
Definition at line 89 of file clause.cpp.
Definition at line 95 of file clause.cpp.
uint32 Clasp::SharedLiterals::simplify | ( | Solver & | s | ) |
Simplifies the literals w.r.t to the assignment in s.
Returns the number of non-false literals in this object or 0 if the array contains a true literal.
Definition at line 67 of file clause.cpp.
uint32 Clasp::SharedLiterals::size | ( | ) | const [inline] |
ConstraintType Clasp::SharedLiterals::type | ( | ) | const [inline] |
bool Clasp::SharedLiterals::unique | ( | ) | const [inline] |
Literal Clasp::SharedLiterals::lits_[0] [private] |
Clasp::atomic<int32> Clasp::SharedLiterals::refCount_ [private] |
uint32 Clasp::SharedLiterals::size_type_ [private] |