#include <qsolver.hh>
Collaboration diagram for QSolver:
Public Member Functions | |
QSolver (QSpace *sp, ScoreAttribuer *ev, valueHeuristic *ve) | |
Constructor for a quantified space solver. Builds, providing a quantified space and a score for this space, a solver for this space. | |
bool | solve (unsigned long int &nodes, unsigned long int &propsteps) |
Solves the quantified space. Solves the quantifies dpace, returning its solution. The parameters are used to provide statistics. | |
Private Member Functions | |
bool | rSolve (QSpace *qs, unsigned long int &nodes, unsigned long int &propsteps, int curvar) |
Private Attributes | |
bool | debug |
int | n |
QSpace * | sp |
int * | nbRanges |
BranchingHeuristic * | bh |
ScoreAttribuer * | eval |
valueHeuristic * | valEval |
Definition at line 43 of file qsolver.hh.
QSolver::QSolver | ( | QSpace * | sp, | |
ScoreAttribuer * | ev, | |||
valueHeuristic * | ve | |||
) |
Constructor for a quantified space solver. Builds, providing a quantified space and a score for this space, a solver for this space.
sp | The quantified space to be solved. | |
ev | The score attribuer ("evaluator") that will be used by the branching heuristic. |
Definition at line 28 of file qsolver.cc.
References bh, debug, eval, QSpace::indicateBranchingHeuristic(), n, nbRanges, QSpace::nv(), sp, and valEval.
bool QSolver::rSolve | ( | QSpace * | qs, | |
unsigned long int & | nodes, | |||
unsigned long int & | propsteps, | |||
int | curvar | |||
) | [private] |
Definition at line 46 of file qsolver.cc.
References QSpace::assign(), BranchingHeuristic::backtrack(), QSpace::backtrack(), bh, QSpace::clone(), QSpace::finalStatus(), n, nbRanges, BranchingHeuristic::nextVar(), QSpace::print(), QSpace::remove(), QSpace::status(), valueHeuristic::subSet(), and valEval.
Referenced by solve().
bool QSolver::solve | ( | unsigned long int & | nodes, | |
unsigned long int & | propsteps | |||
) |
Solves the quantified space. Solves the quantifies dpace, returning its solution. The parameters are used to provide statistics.
nodes | The integer referenced will be increased by the number of nodes of the search tree explored. | |
propsteps | The integer references will be increased by the total number of propagation steps (in the Gecode sense) performed during search. |
Definition at line 40 of file qsolver.cc.
References rSolve(), sp, and QSpace::status().
bool QSolver::debug [private] |
int QSolver::n [private] |
QSpace* QSolver::sp [private] |
int* QSolver::nbRanges [private] |
BranchingHeuristic* QSolver::bh [private] |
ScoreAttribuer* QSolver::eval [private] |
valueHeuristic* QSolver::valEval [private] |