|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.rubik.solver.MoveTable
public abstract class MoveTable
An abstract base class used for creating move mapping tables. Functions for converting between an ordinal and its associated cube state must be overridden in the derived class. This class has been derived from movetabl.cpp and movetabl.h from the 'Kociemba Cube Solver 1.0' (KCube) (c) Greg Schmidt.
| Constructor Summary | |
|---|---|
MoveTable(Cube cube,
int tableSize)
|
|
MoveTable(Cube cube,
int tableSize,
boolean phase2)
The constructor must be provided with a cube to be manipulated during table generation, the size of the table (number of entries), and whether or not the table is a phase 2 table. |
|
| Method Summary | |
|---|---|
void |
dump()
Dump table contents. |
int |
get(int ordinal,
int move)
Overloaded subscript operator allows standard C++ indexing (i.e. |
void |
initialize(java.io.File file,
ProgressObserver pm,
java.lang.String tableName)
Initialize the pruning table by either generating it or loading it from an existing file. |
protected abstract int |
ordinalFromCubeState()
|
protected abstract void |
ordinalToCubeState(int ordinal)
|
int |
size()
Obtain the size of the table (number of logical entries). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MoveTable(Cube cube,
int tableSize,
boolean phase2)
public MoveTable(Cube cube,
int tableSize)
| Method Detail |
|---|
public void initialize(java.io.File file,
ProgressObserver pm,
java.lang.String tableName)
public int get(int ordinal,
int move)
public int size()
public void dump()
protected abstract int ordinalFromCubeState()
protected abstract void ordinalToCubeState(int ordinal)
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||