#include <qecore.hh>
Collaboration diagram for BranchingHeuristic:
Public Member Functions | |
QECODE_EXPORT void | updateVar (int pos, QSpace *qs) |
QECODE_EXPORT | BranchingHeuristic (QSpace *qs, VariableHeuristic *ev) |
Constructor for a branching heuristic. constructor for a branching heuristic on a quantified space, using a score attribuer. | |
QECODE_EXPORT int | nextVar (QSpace *qs) |
QECODE_EXPORT void | backtrack (QSpace *qs) |
QECODE_EXPORT void | vartouched (int pos, QSpace *qs) |
Private Attributes | |
int | size |
int | blocks |
int * | bloc |
stackint | treated |
cheap * | heaps |
stackint | touched |
int * | score |
int | curHeap |
VariableHeuristic * | eval |
Definition at line 203 of file qecore.hh.
BranchingHeuristic::BranchingHeuristic | ( | QSpace * | qs, | |
VariableHeuristic * | ev | |||
) |
Constructor for a branching heuristic. constructor for a branching heuristic on a quantified space, using a score attribuer.
qs | The quantified space the branching heuristic is for. | |
ev | the variable heuristic this branching heuristic will use to determine the next variable |
Definition at line 40 of file qecore.cc.
References bloc, blocks, curHeap, eval, heaps, Heap< C >::insert(), MARKER, QSpace::nv(), QSpace::quantification(), VariableHeuristic::score(), score, Heap< C >::setBounds(), size, touched, and treated.
void BranchingHeuristic::updateVar | ( | int | pos, | |
QSpace * | qs | |||
) |
Definition at line 107 of file qecore.cc.
References bloc, Heap< C >::decrease(), eval, heaps, Heap< C >::increase(), score, and VariableHeuristic::score().
Referenced by backtrack(), and vartouched().
int BranchingHeuristic::nextVar | ( | QSpace * | qs | ) |
Returns the next variable to branch on.
qs | The current quantified space on which we are searching (must be a clone, possibly cloned, propagated and assigned multiple times of the quantified space given at the construction.) |
Definition at line 84 of file qecore.cc.
References blocks, curHeap, Heap< C >::getmin(), Heap< C >::getminwopop(), heaps, MARKER, QSpace::subsumed(), touched, and treated.
Referenced by QSolver::rSolve().
void BranchingHeuristic::backtrack | ( | QSpace * | qs | ) |
Used by the solver to indicate it backtracked.
qs | The current quantified space on which we are searching, i.e. the one on which the solver just backtracked (must be a clone, possibly cloned, propagated and assigned multiple times of the quantified space given at the construction). |
Definition at line 127 of file qecore.cc.
References bloc, curHeap, heaps, Heap< C >::insert(), MARKER, touched, treated, and updateVar().
Referenced by QSolver::rSolve().
void BranchingHeuristic::vartouched | ( | int | pos, | |
QSpace * | qs | |||
) |
Used by the solver to indicate that a variable has been touched, and so thai its scors have possibly changed.
qs | The current quantified space on which we are searching (must be a clone, possibly cloned, propagated and assigned multiple times of the quantified space given at the construction). |
Definition at line 122 of file qecore.cc.
References touched, and updateVar().
Referenced by Warner::warn().
int BranchingHeuristic::size [private] |
int BranchingHeuristic::blocks [private] |
int* BranchingHeuristic::bloc [private] |
Definition at line 207 of file qecore.hh.
Referenced by backtrack(), BranchingHeuristic(), and updateVar().
stackint BranchingHeuristic::treated [private] |
Definition at line 208 of file qecore.hh.
Referenced by backtrack(), BranchingHeuristic(), and nextVar().
cheap* BranchingHeuristic::heaps [private] |
Definition at line 209 of file qecore.hh.
Referenced by backtrack(), BranchingHeuristic(), nextVar(), and updateVar().
stackint BranchingHeuristic::touched [private] |
Definition at line 210 of file qecore.hh.
Referenced by backtrack(), BranchingHeuristic(), nextVar(), and vartouched().
int* BranchingHeuristic::score [private] |
int BranchingHeuristic::curHeap [private] |
Definition at line 212 of file qecore.hh.
Referenced by backtrack(), BranchingHeuristic(), and nextVar().
VariableHeuristic* BranchingHeuristic::eval [private] |