Skip navigation links
C E F G H I L M P T 

C

clone() - Method in class HPancakeSortNode
Return the result of a deep clone of HPancakeSortNode that has a unique pancake array copy for each cloned node.
cost - Variable in class HPancakeSortNode
The cumulative cost of reaching this node given the sequence of previous flips, i.e.

E

expand() - Method in class HPancakeSortNode
Return a list of HPancakeSortNode children that result from a flip of 2 through (length) flips.

F

flip(int) - Method in class HPancakeSortNode
Flip (that is, reverse the order of) the first n pancakes, increase the node cost by n, and set lastFlip to n.

G

getG() - Method in class HPancakeSortNode
Return the total number of pancakes flipped to reach this node from the root node.
getGoalNode(int[]) - Static method in class HPancakeSortNode
Given a pancake index permutation of values from 0 through the array length - 1, return an optimal goal node resulting from A* search with an admissible heuristic that is not h(n) = 0.
getH() - Method in class HPancakeSortNode
Return an admissible heuristic estimate of the cost to a goal node that does not overestimate, nor is the trivial h(n) = 0 heuristic.
getLastFlip() - Method in class HPancakeSortNode
Return the size of the most recently flipped stack of pancakes, or 0 in the case of the root node.

H

HPancakeSortNode - Class in <Unnamed>
 
HPancakeSortNode(int, int) - Constructor for class HPancakeSortNode
Create an HPancakeSortNode that is constructed by creating a sorted sequence of pancake sizes numbered 0 through (length-1) and then performing random reversals of pancakes ranging from 2 to length and initializing this generated root by setting lastFlipped and cost to 0.
HPancakeSortNode(int[]) - Constructor for class HPancakeSortNode
Create an HPancakeSortNode that is constructed with the given pancake permutation of pancake sizes numbered {0-(length-1)}, setting the initial cost to 0.

I

isGoal() - Method in class HPancakeSortNode
Return whether or not the pancake values are sorted in ascending order.

L

lastFlip - Variable in class HPancakeSortNode
Last number of flipped pancakes (2 through length), or 0 for the root search node.

M

main(String[]) - Static method in class HPancakeSortNode
This method will be ignored in JUnit testing, but can serve as a place for your test code.

P

pancake - Variable in class HPancakeSortNode
Current pancake sequence consisting of a permutation of integers from 0 through length - 1.

T

toString() - Method in class HPancakeSortNode
Return a single line String representation of the current node including node cost (g(n)), the last flip made, and the current pancake sequence.
C E F G H I L M P T 
Skip navigation links