public class BacktrackingSolvabilitySomewhatEfficient extends EfficientPebbleAlgorithm
| Modifier and Type | Class and Description |
|---|---|
class |
BacktrackingSolvabilitySomewhatEfficient.Move |
| Constructor and Description |
|---|
BacktrackingSolvabilitySomewhatEfficient() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
argumentFormat()
Describe how the argument(s) to the algorithm should be formatted, if applicable.
|
boolean |
backTrackingSolvability() |
boolean |
countsOperations() |
java.lang.String |
getCurrentProblemData() |
int |
getDistance(Vertex v)
Returns the length of the shortest path from this vertex to any other vertex on the graph (counting each edge as
1)
|
int |
getPebbleCount(Vertex v) |
java.lang.String |
getProgressReport()
HTML text that will be displayed in the Algorithm Runner that explains what the algorithm is doing.
|
java.lang.String |
getResult()
Return the result of the algorithm in the context of the problem.
|
double |
getVersion()
Mostly for use in comparing results from previous versions of algorithms, and/or so we can know whether or not
data in the database is based on an older version of the algorithm.
|
void |
initializeMoreData()
Called by initializeData which is called by setPuzzleData.
|
boolean |
isSolved() |
void |
parseArguments(java.lang.String args)
Sends a string that the user can enter to the algorithm.
|
void |
quit()
(Hopefully) gracefully stop the computation.
|
void |
reinitializeMoreData()
If resetWithThesePebbles is called, what else needs to be reinitialized before the algorithm can be run?
This is supposed to be much more efficient than calling initializeMoreData.
|
void |
runAlgorithm()
Runs the Algorithm.
|
void |
setPebbleCount(Vertex v,
int numberOfPebbles) |
getCovered, resetWithThesePebbles, resetWithThesePebblesgetPebbleState, getProblemType, initializeData, setPebbleStategetNumberOfOperations, getState, isDone, isNotDone, isQuit, setProblemData, setStatepublic BacktrackingSolvabilitySomewhatEfficient()
public void initializeMoreData()
PebbleAlgorithminitializeMoreData in class EfficientPebbleAlgorithmpublic void reinitializeMoreData()
EfficientPebbleAlgorithmreinitializeMoreData in class EfficientPebbleAlgorithmpublic void runAlgorithm()
public boolean backTrackingSolvability()
public java.lang.String getProgressReport()
getProgressReport in interface AlgorithmInterface<PebbleInstance>getProgressReport in class PebbleAlgorithmpublic java.lang.String getResult()
getResult in interface AlgorithmInterface<PebbleInstance>getResult in class PebbleAlgorithmpublic java.lang.String getCurrentProblemData()
getCurrentProblemData in interface AlgorithmInterface<PebbleInstance>getCurrentProblemData in class EfficientPebbleAlgorithmpublic boolean countsOperations()
public double getVersion()
public void quit()
quit in interface AlgorithmInterface<PebbleInstance>quit in class PebbleAlgorithmpublic boolean isSolved()
public int getPebbleCount(Vertex v)
public void setPebbleCount(Vertex v, int numberOfPebbles)
public int getDistance(Vertex v)
public void parseArguments(java.lang.String args)
AlgorithmInterfacepublic java.lang.String argumentFormat()
AlgorithmInterface