public class EfficientPebbleGraph extends EfficientListGraph
adjList, numberVertices
Constructor and Description |
---|
EfficientPebbleGraph(EfficientPebbleGraph graph) |
EfficientPebbleGraph(PebbleInstance pi) |
Modifier and Type | Method and Description |
---|---|
boolean |
areAllCovered() |
boolean[] |
areCovered() |
void |
doAllMoves(int source,
int dest) |
void |
doMove(int source,
int dest) |
int |
firstMoveSource() |
boolean[] |
getCovered() |
int |
getNumberCoveredVertices() |
int |
getNumberOfPebblesOnVertex(int vert) |
java.lang.String |
getPebblesAsString() |
boolean |
isCovered(int vertex) |
boolean |
isMove() |
void |
resetPebbles() |
void |
setCovered(int vertex) |
boolean |
setPebbles(int[] newPebbles) |
boolean |
setPebblesAndCovered(int[] newPebbles,
boolean[] newCovered) |
void |
undoMove(int source,
int dest) |
degree, fromString, getNumberVertices
public EfficientPebbleGraph(EfficientPebbleGraph graph)
public EfficientPebbleGraph(PebbleInstance pi)
public boolean setPebblesAndCovered(int[] newPebbles, boolean[] newCovered)
public boolean setPebbles(int[] newPebbles)
public boolean[] areCovered()
public void undoMove(int source, int dest)
public void doMove(int source, int dest)
public void doAllMoves(int source, int dest)
public int firstMoveSource()
public boolean isMove()
public void setCovered(int vertex)
public boolean[] getCovered()
public boolean isCovered(int vertex)
public int getNumberCoveredVertices()
public boolean areAllCovered()
public void resetPebbles()
public int getNumberOfPebblesOnVertex(int vert)
public java.lang.String getPebblesAsString()