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, resetWithThesePebbles
getPebbleState, getProblemType, getResult, initializeData, quit, setPebbleState
getNumberOfOperations, getState, isDone, isNotDone, isQuit, setProblemData, setState
public int getRootIndex()
public void setRootIndex(int rootIndex)
rootIndex
- public void initializeMoreData()
PebbleAlgorithm
initializeMoreData
in class EfficientPebbleAlgorithm
public void reinitializeMoreData()
EfficientPebbleAlgorithm
reinitializeMoreData
in class EfficientPebbleAlgorithm
public int getTotalPebbles()
public void runAlgorithm()
AlgorithmInterface
public 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()
PebbleAlgorithm
getProgressReport
in interface AlgorithmInterface<PebbleInstance>
getProgressReport
in class PebbleAlgorithm
public boolean countsOperations()
public double getVersion()
AlgorithmInterface
public void printLists()
public void parseArguments(java.lang.String args)
AlgorithmInterface
public java.lang.String argumentFormat()
AlgorithmInterface