#include <qsolver.hh>
Collaboration diagram for QSolver:
Public Member Functions | |
QECODE_EXPORT | QSolver (QSpace *sp, VariableHeuristic *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. | |
QECODE_EXPORT 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 |
VariableHeuristic * | eval |
valueHeuristic * | valEval |
Definition at line 43 of file qsolver.hh.
QSolver::QSolver | ( | QSpace * | sp, | |
VariableHeuristic * | 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_bool(), QSpace::assign_int(), BranchingHeuristic::backtrack(), QSpace::backtrack(), bh, QSpace::clone(), QSpace::finalStatus(), n, nbRanges, BranchingHeuristic::nextVar(), QSpace::print(), QSpace::remove_bool(), QSpace::remove_int(), QSpace::status(), valueHeuristic::subSet(), QSpace::type_of_v, valEval, VTYPE_BOOL, and VTYPE_INT.
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().
Referenced by main().
bool QSolver::debug [private] |
int QSolver::n [private] |
QSpace* QSolver::sp [private] |
int* QSolver::nbRanges [private] |
BranchingHeuristic* QSolver::bh [private] |
VariableHeuristic* QSolver::eval [private] |
valueHeuristic* QSolver::valEval [private] |