public class MergePebbles extends EfficientPebbleAlgorithm
| Constructor and Description |
|---|
MergePebbles() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPebbleAndUnprocessCompositePebbles(int indexToAddPebble)
In an attempt to speed up pebblingNumberBottomUp, this method is created.
|
java.lang.String |
argumentFormat()
Describe how the argument(s) to the algorithm should be formatted, if applicable.
|
boolean |
countsOperations() |
void |
doMergers() |
java.lang.String |
getProgressReport()
The Default implementation for a pebble algorithm.
|
int |
getRootIndex() |
int |
getTotalPebbles() |
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.
|
void |
isSolvable() |
void |
parseArguments(java.lang.String args)
Sends a string that the user can enter to the algorithm.
|
void |
printLists() |
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 |
removePebbleAndUpdatePebbleLists(int indexToRemovePebble)
To be used when the method above (addPebbleAndUnprocessCompositePebbles) is used.
|
void |
runAlgorithm()
Runs the Algorithm.
|
void |
setRootIndex(int rootIndex)
Set this to the appropriate index before running the algorithm to do reachable instead of solvable.
|
getCovered, getCurrentProblemData, resetWithThesePebbles, resetWithThesePebblesgetPebbleState, getProblemType, getResult, initializeData, quit, setPebbleStategetNumberOfOperations, getState, isDone, isNotDone, isQuit, setProblemData, setStatepublic int getRootIndex()
public void setRootIndex(int rootIndex)
rootIndex - public void initializeMoreData()
PebbleAlgorithminitializeMoreData in class EfficientPebbleAlgorithmpublic void reinitializeMoreData()
EfficientPebbleAlgorithmreinitializeMoreData in class EfficientPebbleAlgorithmpublic int getTotalPebbles()
public void runAlgorithm()
AlgorithmInterfacepublic void isSolvable()
public void doMergers()
public void addPebbleAndUnprocessCompositePebbles(int indexToAddPebble)
indexToAddPebble - The index representing the vertex on the graph upon which a single additional pebble is
to be placed.public void removePebbleAndUpdatePebbleLists(int indexToRemovePebble)
indexToRemovePebble - The vertex that loses a pebble. by Aaron Green, October 2016public java.lang.String getProgressReport()
PebbleAlgorithmgetProgressReport in interface AlgorithmInterface<PebbleInstance>getProgressReport in class PebbleAlgorithmpublic boolean countsOperations()
public double getVersion()
AlgorithmInterfacepublic void printLists()
public void parseArguments(java.lang.String args)
AlgorithmInterfacepublic java.lang.String argumentFormat()
AlgorithmInterface