|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.act365.sudoku.LinearSystemState
LinearSystemState stores the system of linear equations defined by the Sudoku puzzle.
| Field Summary | |
static int |
defaultDisplayFormat
|
static int |
EQUATIONS
|
static int |
MATRIX
|
| Constructor Summary | |
LinearSystemState()
|
|
| Method Summary | |
void |
addMove(int x,
int y,
int v)
Adds the constraint (x,y):=v to the system and reduces. |
void |
eliminateMove(int x,
int y,
int v)
Updates the state grid to account for the fact that the move (x,y):=v has been eliminated as a possibility. |
void |
popState(int nMoves)
Unwinds a state grid from the thread. |
void |
pushState(int nMoves)
Adds a state grid to the thread. |
void |
setup(int boxesAcross,
int boxesDown)
Sets up the state grid and its thread. |
java.lang.String |
toString()
String representation |
java.lang.String |
toString(int v,
int displayFormat)
String representation of the equations for the chosen value in the chosen display format. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int EQUATIONS
public static final int MATRIX
public static int defaultDisplayFormat
| Constructor Detail |
public LinearSystemState()
| Method Detail |
public void setup(int boxesAcross,
int boxesDown)
IState
setup in interface IStateIState.setup(int, int)public void pushState(int nMoves)
IState
pushState in interface IStatenMoves - thread position to which state should be writtenIState.pushState(int)public void popState(int nMoves)
IState
popState in interface IStatenMoves - thread position from which state should be readIState.popState(int)
public void addMove(int x,
int y,
int v)
throws MoveException
addMove in interface IStateMoveExceptionIState.addMove(int, int, int)
public void eliminateMove(int x,
int y,
int v)
IState
eliminateMove in interface IStateIState.eliminateMove(int, int, int)public java.lang.String toString()
toString in interface IState
public java.lang.String toString(int v,
int displayFormat)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||