clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | Static Public Member Functions | List of all members
Clasp::SharedLiterals Class Reference

An array of literals that can be shared between threads. More...

#include <clause.h>

Collaboration diagram for Clasp::SharedLiterals:
Collaboration graph

Public Member Functions

const Literalbegin () const
 Returns a pointer to the beginning of the literal array. More...
 
const Literalend () const
 Returns a pointer to the end of the literal array. More...
 
uint32 size () const
 Returns the number of literals in the array. More...
 
ConstraintType type () const
 Returns the type of constraint from which the literals originated. More...
 
uint32 simplify (Solver &s)
 Simplifies the literals w.r.t to the assignment in s. More...
 
void release ()
 
SharedLiteralsshare ()
 
bool unique () const
 
uint32 refCount () const
 

Static Public Member Functions

static SharedLiteralsnewShareable (const LitVec &lits, ConstraintType t, uint32 numRefs=1)
 Creates a shareable (ref-counted) object containing the literals in lits. More...
 
static SharedLiteralsnewShareable (const Literal *lits, uint32 size, ConstraintType t, uint32 numRefs=1)
 

Detailed Description

An array of literals that can be shared between threads.

Member Function Documentation

const Literal* Clasp::SharedLiterals::begin ( ) const
inline

Returns a pointer to the beginning of the literal array.

const Literal* Clasp::SharedLiterals::end ( ) const
inline

Returns a pointer to the end of the literal array.

Here is the call graph for this function:

static SharedLiterals* Clasp::SharedLiterals::newShareable ( const LitVec lits,
ConstraintType  t,
uint32  numRefs = 1 
)
inlinestatic

Creates a shareable (ref-counted) object containing the literals in lits.

Note
The reference count is set to numRefs.
SharedLiterals * Clasp::SharedLiterals::newShareable ( const Literal lits,
uint32  size,
ConstraintType  t,
uint32  numRefs = 1 
)
static

Here is the call graph for this function:

uint32 Clasp::SharedLiterals::refCount ( ) const
inline
void Clasp::SharedLiterals::release ( )

Here is the call graph for this function:

SharedLiterals * Clasp::SharedLiterals::share ( )
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.

Note
If the object is currently not shared, simplify() removes all false literals from the array.

Here is the call graph for this function:

uint32 Clasp::SharedLiterals::size ( ) const
inline

Returns the number of literals in the array.

ConstraintType Clasp::SharedLiterals::type ( ) const
inline

Returns the type of constraint from which the literals originated.

bool Clasp::SharedLiterals::unique ( ) const
inline

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