Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Clasp::SharedLiterals Class Reference

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

#include <clause.h>

List of all members.

Public Member Functions

const Literalbegin () const
 Returns a pointer to the beginning of the literal array.
const Literalend () const
 Returns a pointer to the end of the literal array.
uint32 refCount () const
void release ()
SharedLiteralsshare ()
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 SharedLiteralsnewShareable (const LitVec &lits, ConstraintType t, uint32 numRefs=1)
 Creates a shareable (ref-counted) object containing the literals in lits.
static SharedLiteralsnewShareable (const Literal *lits, uint32 size, ConstraintType t, uint32 numRefs=1)

Private Member Functions

void destroy ()
SharedLiteralsoperator= (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_

Detailed Description

An array of literals that can be shared between threads.

Definition at line 33 of file clause.h.


Constructor & Destructor Documentation

Clasp::SharedLiterals::SharedLiterals ( const Literal lits,
uint32  size,
ConstraintType  t,
uint32  numRefs 
) [private]

Definition at line 61 of file clause.cpp.


Member Function Documentation

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

Returns a pointer to the beginning of the literal array.

Definition at line 45 of file clause.h.

void Clasp::SharedLiterals::destroy ( ) [private]
const Literal* Clasp::SharedLiterals::end ( ) const [inline]

Returns a pointer to the end of the literal array.

Definition at line 47 of file clause.h.

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

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

Note:
The reference count is set to numRefs.

Definition at line 39 of file clause.h.

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]

Definition at line 64 of file clause.h.

Definition at line 89 of file clause.cpp.

Definition at line 95 of file clause.cpp.

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.

Definition at line 67 of file clause.cpp.

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

Returns the number of literals in the array.

Definition at line 49 of file clause.h.

Returns the type of constraint from which the literals originated.

Definition at line 51 of file clause.h.

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

Definition at line 63 of file clause.h.


Member Data Documentation

Definition at line 72 of file clause.h.

Definition at line 70 of file clause.h.

Definition at line 71 of file clause.h.


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


clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:41