01: package mlsub.typing.lowlevel;
02:
03: /**
04: * @version $Revision: 1.1 $, $Date: 2000/06/14 13:32:52 $
05: * @author Alexandre Frey
06: **/
07: abstract public class LowlevelSolutionHandler {
08: private DomainVector _solution = null;
09:
10: // private BitVector garbage;
11: // final void fillSolution(DomainVector _solution) {
12: // this._solution = _solution;
13: // }
14:
15: final void handle(DomainVector _solution) {
16: this ._solution = _solution;
17: handle();
18: }
19:
20: final protected int getSolutionOf(int x) {
21: return _solution.getDomain(x).getLowestSetBit();
22: }
23:
24: /**
25: * Called when a solution is found. handle can then call getSolutionOf(x) to
26: * retrieve the solution.
27: **/
28: abstract protected void handle();
29: }
|