SatItemVector Class Reference
[SAT Solver]

#include <SatSolver.h>

Collaboration diagram for SatItemVector:

Collaboration graph
[legend]

List of all members.


Detailed Description

Linear storage container for ISatItem objects.

Attention:
On heap allocated objects are expected. They will be deleted by container's destructor.

Definition at line 240 of file SatSolver.h.


Public Member Functions

 SatItemVector ()
 SatItemVector (const SatItemVector &)
 Deep copy.
 ~SatItemVector ()
int getLength () const
 
Returns:
Returns count of item managed by container.

ISatItemgetItem (int index) const
 Direct access container item.
void addItem (ISatItem *item)
 Add item to container.
void clear ()
 Remove all item from container and free from memory.
void writeOut (SatProblem *, std::ostream &streamTo) const
 Human readable container dump.

Classes

struct  Private

Constructor & Destructor Documentation

SatItemVector (  ) 

Definition at line 158 of file SatSolver.cpp.

SatItemVector ( const SatItemVector other  ) 

Deep copy.

Definition at line 162 of file SatSolver.cpp.

References ISatItem::clone(), SatItemVector::getItem(), SatItemVector::getLength(), and SatItemVector::Private::vect.

~SatItemVector (  ) 

Definition at line 169 of file SatSolver.cpp.

References SatItemVector::clear().


Member Function Documentation

int getLength (  )  const

Returns:
Returns count of item managed by container.

Definition at line 173 of file SatSolver.cpp.

References SatItemVector::Private::vect.

Referenced by BlindSatSolver::getSolutionsCount(), main(), SatItemSet::Private::SatItemHashDecorator::operator<(), SatItemVector::SatItemVector(), and SatItemVector::writeOut().

ISatItem * getItem ( int  index  )  const

Direct access container item.

Parameters:
index Index should be in range <0, getLength()-1>.
Returns:
Returns pointer to desired item.

Definition at line 176 of file SatSolver.cpp.

References SatItemVector::Private::vect.

Referenced by SatItemVector::SatItemVector(), and SatItemVector::writeOut().

void addItem ( ISatItem item  ) 

Add item to container.

Parameters:
item Item to add to container.
Attention:
On heap allocated objects is expected. It will be deleted by container's destructor.

Definition at line 179 of file SatSolver.cpp.

References SatItemVector::Private::vect.

Referenced by SatItemSet::createVector(), and BlindSatSolver::doStep().

void clear (  ) 

Remove all item from container and free from memory.

Definition at line 197 of file SatSolver.cpp.

References SatItemVector::Private::vect.

Referenced by BlindSatSolver::initialize(), and SatItemVector::~SatItemVector().

void writeOut ( SatProblem problem,
std::ostream &  streamTo 
) const

Human readable container dump.

Parameters:
problem Pointer to SatProblem instance, which knows variable names.
streamTo Standard output stream, which is used for output.

Definition at line 182 of file SatSolver.cpp.

References ISatItem::getBit(), SatItemVector::getItem(), SatItemVector::getLength(), SatProblem::getVarName(), and SatProblem::getVarsCount().

Referenced by main().


The documentation for this class was generated from the following files:
Generated on Wed Nov 5 22:30:22 2008 for Fast SAT Solver by  doxygen 1.5.4