omnics.expl
Class DefaultExplainer

java.lang.Object
  extended by omnics.event.SolverAdapter
      extended by omnics.expl.AbstractExplainer
          extended by omnics.expl.DefaultExplainer
All Implemented Interfaces:
java.io.Serializable, SolverListener, Explainer

public class DefaultExplainer
extends AbstractExplainer

Author:
Cristian Frasinaru
See Also:
Serialized Form

Field Summary
 
Fields inherited from class omnics.expl.AbstractExplainer
solver
 
Constructor Summary
DefaultExplainer()
           
 
Method Summary
 java.lang.String create()
          Creates the explanation.
 Explanation getExplanation()
          Returns the current explanation node which coresponds to the current solution.
 void nogoodFound(FilterEvent event)
          Called when a nogood is found.
 void setExplanation(Explanation explanation)
          Sets the current explanation node.
 void solutionExtended(SolverEvent event)
          Starts a new explanation for the current solution.
 void solutionRestored(SolverEvent event)
          Restores the explanation corresponding to the current solution.
 void solverStarted(SolverEvent event)
          Starts a new explanation.
 void valueRemoved(EliminationEvent event)
          A value was removed.
 
Methods inherited from class omnics.expl.AbstractExplainer
explain, explain, explain, getSolver, setSolver
 
Methods inherited from class omnics.event.SolverAdapter
problemFiltered, solutionFound, solverFinished, solverPaused, solverResumed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExplainer

public DefaultExplainer()
Method Detail

getExplanation

public Explanation getExplanation()
Returns the current explanation node which coresponds to the current solution.


setExplanation

public void setExplanation(Explanation explanation)
Sets the current explanation node.


solverStarted

public void solverStarted(SolverEvent event)
Starts a new explanation.

Specified by:
solverStarted in interface SolverListener
Overrides:
solverStarted in class SolverAdapter

solutionExtended

public void solutionExtended(SolverEvent event)
Starts a new explanation for the current solution.

Specified by:
solutionExtended in interface SolverListener
Overrides:
solutionExtended in class SolverAdapter

solutionRestored

public void solutionRestored(SolverEvent event)
Restores the explanation corresponding to the current solution.

Specified by:
solutionRestored in interface SolverListener
Overrides:
solutionRestored in class SolverAdapter

valueRemoved

public void valueRemoved(EliminationEvent event)
A value was removed.

Specified by:
valueRemoved in interface SolverListener
Overrides:
valueRemoved in class SolverAdapter

nogoodFound

public void nogoodFound(FilterEvent event)
Description copied from interface: SolverListener
Called when a nogood is found.

Specified by:
nogoodFound in interface SolverListener
Overrides:
nogoodFound in class SolverAdapter

create

public java.lang.String create()
Description copied from interface: Explainer
Creates the explanation.