|
Public Types |
|
typedef vhash_type::const_iterator | variable_iterator |
|
typedef chash_type::const_iterator | constraint_iterator |
|
typedef shash_type::const_iterator | solution_iterator |
Public Member Functions |
|
| Problem (csp::RandomSequence &randomSequence) |
|
| Problem (const Problem &problem) |
|
virtual wstring | name () const |
|
void | addNonConsecutiveConstraint (int index0, int index1) |
|
void | addDifferentConstraint (int index0, int index1) |
|
virtual wostream & | printSolution (wostream &wos) const |
|
virtual wostream & | print (wostream &wos) const |
|
| Problem (csp::RandomSequence &randomSequence, int order, bool idempotency=false, bool symmetry=true, int holes=0, bool balanced=true) |
|
| Problem (const Problem &problem) |
|
| Problem (csp::RandomSequence &randomSequence, wifstream &wifs) |
|
virtual wstring | name () const |
|
Variable & | variable (int row, int column) const |
|
int | order () const |
|
virtual bool | isSolution () const |
| virtual void | save (wofstream &wofs) const |
|
virtual wostream & | printSolution (wostream &wos) const |
|
virtual wostream & | print (wostream &wos) const |
|
| Problem (csp::RandomSequence &randomSequence, int queens, bool compact=false, bool symmetry=true) |
|
| Problem (const Problem &problem) |
|
virtual wstring | name () const |
|
virtual wostream & | printSolution (wostream &wos) const |
|
virtual wostream & | print (wostream &wos) const |
|
| Problem (csp::RandomSequence &randomSequence, const wstring &model, bool flawed, bool weightSearch, size_t nVariables, size_t domainSize, double density, double tightness, bool nonStandardDensity=true, size_t weakSpots=0, size_t weakSpotConstraints=5) |
|
| Problem (const Problem &problem) |
|
| Problem (csp::RandomSequence &randomSequence, wifstream &wifs) |
|
virtual wstring | name () const |
|
bool | weightSearch () const |
|
double | weight () const |
|
double | minWeight () const |
|
double | maxWeight () const |
|
double | currentWeight () const |
|
double | minAcceptableWeight () const |
|
double | maxAcceptableWeight () const |
|
void | setMinAcceptableWeight (double minAcceptableWeight) |
|
void | setMaxAcceptableWeight (double maxAcceptableWeight) |
| double | minFutureWeight () const |
| double | maxFutureWeight () const |
|
double | idealWeight () const |
|
void | computeConstraintAcceptableWeightRange () |
| virtual void | save (wofstream &wofs) const |
|
void | loadSolutions (wifstream &wifs) |
| | Load solutions from a given file.
|
|
void | saveSolution (wofstream &wofs) const |
| | Save the current solution to the given output stream.
|
|
virtual wostream & | printSolution (wostream &wos) const |
|
virtual wostream & | print (wostream &wos) const |
|
| Problem (csp::RandomSequence &randomSequence, const wstring &domainsFileName, const wstring &variablesFileName, const wstring &constraintsFileName) |
|
| Problem (const Problem &problem) |
|
virtual wstring | name () const |
|
void | addDistanceConstraint (int index0, int index1, int distance) |
|
void | addEqualityConstraint (int index0, int index1, int distance) |
|
virtual wostream & | printSolution (wostream &wos) const |
|
virtual wostream & | print (wostream &wos) const |
|
| Problem (RandomSequence &randomSequence) |
| | Default constructor.
|
|
virtual | ~Problem () |
| | Destructor.
|
| virtual wstring | name () const |
| virtual wstring | signature () const |
| size_t | variables () const |
| size_t | constraints () const |
| size_t | solutions () const |
|
const variable_iterator | beginVariables () const |
| | Return an iterator to the first variable in the problem.
|
|
const variable_iterator | endVariables () const |
| | Return an iterator past the last variable in the problem.
|
|
const constraint_iterator | beginConstraints () const |
| | Return an iterator to the first constraint in the problem.
|
|
const constraint_iterator | endConstraints () const |
| | Return an iterator past the last constraint in the problem.
|
|
const solution_iterator | beginSolutions () const |
| | Return an iterator to the first precomputed solution to the problem.
|
|
const solution_iterator | endSolutions () const |
| | Return an iterator past the last precomputed solution to the problem.
|
|
Variable & | variable (id_t id) |
| | Return the variable with the given id.
|
|
const Variable & | variable (id_t id) const |
| | Return the variable with the given id.
|
|
Constraint & | constraint (id_t id) |
| | Return the constraint with the given id.
|
|
const Constraint & | constraint (id_t id) const |
| | Return the constraint with the given id.
|
| virtual bool | isSolution () const |
| bool | isInternallyConsistent () const |
| bool | isArcConsistent () const |
|
virtual wostream & | printSolution (wostream &wos) const |
| | Print the problem's solution to an output stream.
|
| virtual void | init () |
| virtual void | done () |
| size_t | maxDomainSize () const |
|
RandomSequence & | randomSequence () const |
| | Return the RandomSequence object used by this problem instance.
|
| virtual wostream & | print (wostream &wos) const |
| virtual void | generateGraph (wostream &wos) const |
| virtual void | save (wofstream &wofs) const |
| virtual void | saveSolution (wofstream &wofs) const |
| variable_iterator | add (Variable &variable) |
| void | remove (Variable &variable) |
| constraint_iterator | add (Constraint &constraint) |
| void | remove (Constraint &constraint) |
| ulonglong | totalCCKS () const |
|
ulonglong | failedCCKS () const |
| | Return the current number of constraint failures.
|
Protected Member Functions |
|
void | addConstraint (csp::Variable &variable0, csp::Variable &variable1, int queens) |
|
void | addVerticalConstraint (csp::Variable &variable0, csp::Variable &variable1) |
|
void | addDiagonalConstraint (csp::Variable &variable0, csp::Variable &variable1) |
|
void | addSymmetryConstraint (csp::Variable &variable0, csp::Variable &variable1, int queens) |
| | Problem (const Problem &problem) |
| void | add (Solution &solution) |
| int | nextRandomNumber (int limit) |
Friends |
|
CSP_API wostream & | operator<< (wostream &wos, const Problem &problem) |