public abstract class SolutionStrategy
extends java.lang.Object
| Constructor and Description |
|---|
SolutionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCSPStateListener(CSPStateListener listener)
Adds a CSP state listener to the solution strategy.
|
protected void |
fireStateChanged(Assignment assignment,
CSP csp) |
protected void |
fireStateChanged(CSP csp) |
void |
removeCSPStateListener(CSPStateListener listener)
Removes a CSP listener from the solution strategy.
|
abstract Assignment |
solve(CSP csp)
Returns a solution to the specified CSP, which specifies values for all
the variables such that the constraints are satisfied.
|
public void addCSPStateListener(CSPStateListener listener)
listener - a listener which follows the progress of the solution strategy
step-by-step.public void removeCSPStateListener(CSPStateListener listener)
listener - the listener to removeprotected void fireStateChanged(CSP csp)
protected void fireStateChanged(Assignment assignment, CSP csp)
public abstract Assignment solve(CSP csp)
csp - a CSP to solve