B C D E F G I M N O P Q R S T U 

B

BLOCKED - Variable in class unionfind.Percolation
The lowest status that can be entered into an array index (Blocked - this.squaredDimensionHigh).

C

checkBound(int) - Method in class unionfind.Percolation
 
checkBounds(int, int) - Method in class unionfind.Percolation
 
checkPerculation() - Method in class unionfind.Percolation
Checks the entire grid, starting at col 1(opentNodeSearchCtr), to determine if the grid perculates (filled square has reached the bottom of the grid).
col - Variable in class unionfind.Percolation
 
convertGridCoordToLinearNode(int, int) - Method in class unionfind.Percolation
Method maps the random coordinates from the createNode method to the Linear Array in UF
convertLinearArrayNodeToGridCoord(int) - Method in class unionfind.Percolation
Converts a linear array index to an N by N grid coordinate and stores the row and col instance.
count - Variable in class unionfind.Percolation
Tracks the number of inputs read from the external file, it is incremented by 2 because the coordinates come in pairs (col, row).
createNode() - Method in class unionfind.Percolation
Creates random linear index from the dimensionLow and the squaredDimensionHigh instance variables.

D

dimensionHigh - Variable in class unionfind.Percolation
The dimension of the N by N grid, +1 to get rid of 0 offset
dimensionLow - Static variable in class unionfind.Percolation
The lowest index of the N by N grid, starts at 0
doubleThreshold - Variable in class unionfind.Percolation
 
drawSquare(int, int, int) - Method in class unionfind.Percolation
Draws the background color of the squares, based on its status
drawText(String) - Method in class unionfind.Percolation
 

E

endOfRowReached - Variable in class unionfind.Percolation
Flag that is set to true when the end of a row has been reached.

F

FILLED - Variable in class unionfind.Percolation
The highest status that can be entered into an array index (Filled - this.squaredDimensionHigh+2).
filledRowCounter - Variable in class unionfind.Percolation
Keeps track of the total number of Filled squares.
fillRow - Variable in class unionfind.Percolation
Keeps track of the number of squares Filled in the row (starting at 1).
flipBlockedNodeToOpened(int, int) - Method in class unionfind.Percolation
Method Flips Blocked Nodes to Opened, if surrounding squares are Filled.
flipOpenNodeToFilled(int, int) - Method in class unionfind.Percolation
Method changes the value in the square associated with the (col, row) coordinate in the N by N grid, from Opened to Filled.
flipSurroundingOpenSquaresToFilled(int, int) - Method in class unionfind.Percolation
Method checks surrounding squares and changes colors as necessary Method is recursively called to flip squares from Opened (White) to Filled (Green) as necessary.

G

getRandomNum(int, int) - Method in class unionfind.Percolation
Returns a random integer uniformly in [a, b).
grid - Variable in class unionfind.Percolation
The N by N grid array.

I

inputArray - Static variable in class unionfind.Percolation
The linear input array.
isBlockedNodeReadyToBeOpened(int, int) - Method in class unionfind.Percolation
Method checks if target square is Blocked, and instance var status is set to Opened.
isFilled(int, int) - Method in class unionfind.Percolation
 
isOpen(int, int) - Method in class unionfind.Percolation
 
isOpenNodeReadyToBeFilled(int, int) - Method in class unionfind.Percolation
Method checks if target node is Opened and instance var status is set to Filled.
isSurroundingSquareFilled(int, int) - Method in class unionfind.Percolation
Method checks to the Left, Above, Right, and Below the current sqaure, for filled squares.

M

main(String[]) - Static method in class unionfind.Percolation
 

N

nodeChangerRowTracker() - Method in class unionfind.Percolation
Method changes the colors from Blocked to Opened, and from Opened to Filled.
numberOfOpenSites() - Method in class unionfind.Percolation
 

O

open(int, int) - Method in class unionfind.Percolation
Sets the square at (col, row) to Opened, and flips the row , so coordinates (0,0) is at the top of the coordinate system, instead of at lower left.
OPENED - Variable in class unionfind.Percolation
The middle status that can be entered into an array index (Opened - this.squaredDimensionHigh+1).
openedSquareCounter - Variable in class unionfind.Percolation
The total number of Opened squares
openNodeSearchCol - Variable in class unionfind.Percolation
The starting value (1) used to search for other opened squares in the same row, when an opened square is found.
openSquare(int, int) - Method in class unionfind.Percolation
Method changes the N by N square coordinates(row, col) from blocked to opened

P

percolates - Variable in class unionfind.Percolation
Boolean value that returns true if the grid perculates (Filled value reaches the bottom of the grid).
percolates() - Method in class unionfind.Percolation
Determines if the grid percolates (Filled square reaches the bottom grid).
Percolation - Class in unionfind
Written: 7/20/2017 Last updated: 7/20/2017
Percolation(int) - Constructor for class unionfind.Percolation
Percolation constructor intializes all the grid values based on the dimensions.
printBlockedGrid(int) - Method in class unionfind.Percolation
Prints the grid with initial Blocked values

Q

qf - Variable in class unionfind.Percolation
 

R

row - Variable in class unionfind.Percolation
 

S

searchForOpenedNodeByRow(int, int) - Method in class unionfind.Percolation
When an opened node is found in the grid, the method searches the row of the Opened square of other Opened squares, to be Filled (starting at col 1, to take care of the 1 col offset).
squaredDimensionHigh - Variable in class unionfind.Percolation
The total number of squares in the grid.
status - Variable in class unionfind.Percolation
The array index value of the grid, where squaredDimensionHigh = Blocked, squaredDimensionHigh+1= Opened, squaredDimensionHigh+2 = Filled.
statusHigh - Static variable in class unionfind.Percolation
The highest status that can be entered into an array index (Filled - this.squaredDimensionHigh+2).
statusLow - Static variable in class unionfind.Percolation
The highest status that can be entered into an array index (Blocked - this.squaredDimensionHigh).

T

threshold() - Method in class unionfind.Percolation
 
totalFilledSquares - Variable in class unionfind.Percolation
The total number of Filled squares.

U

unionfind - package unionfind
 
B C D E F G I M N O P Q R S T U