A B C D E F G H I J K L M N O P Q R S T U V W X Z

A

a - Variable in class com.mhhe.clrs2e.AdjacencyMatrixGraph
The adjacency matrix.
a - Variable in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Weighted adjacency matrix; a[u][v] is the weight of edge (u,v).
absentValue - Variable in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
The value indicating an absent edge; if a[u][v] equals absentValue, then edge (u,v) is not present in the graph.
Activity - class com.mhhe.clrs2e.Activity.
A class for activities in the activity-selection problem of Section 16.1 of Introduction to Algorithms, Second edition.
Activity(double, double) - Constructor for class com.mhhe.clrs2e.Activity
Creates a new activity.
ActivitySelector - interface com.mhhe.clrs2e.ActivitySelector.
Interface for a class that determines a maximum set of mutually compatible activities.
actualSize() - Method in class com.mhhe.clrs2e.OrderStatisticTree
Returns the actual size of the entire tree.
actualSize(Object) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Returns the actual size of the subtree rooted at a node.
addChild(Object, DynamicSetElement, boolean) - Method in class com.mhhe.clrs2e.FibHeap
Adds a child with a dynamic set element to a node, inserting the child into the Fibonacci heap.
addConstraint(int, int, double) - Method in class com.mhhe.clrs2e.DifferenceConstraints
Adds a constraint xj - xibk to the system of difference constraints.
addEdge(int, int) - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Adds an edge to this graph.
addEdge(int, int) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Adds an edge to this graph.
addEdge(int, int) - Method in class com.mhhe.clrs2e.FlowNetwork
Unsupported, since edges in a flow network must have capacities.
addEdge(int, int) - Method in interface com.mhhe.clrs2e.Graph
Adds an edge to this graph.
addEdge(int, int) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Unsupported, since edges in a weighted graph must have weights.
addEdge(int, int) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Unsupported, since edges in a weighted graph must have weights.
addEdge(int, int, double) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Adds a weighted edge to this graph.
addEdge(int, int, double) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Adds a weighted edge to this graph.
addEdge(int, int, double, double) - Method in class com.mhhe.clrs2e.FlowNetwork
Adds an edge (u,v) and its reverse edge (v,u) to this graph.
addEdge(Vertex, Vertex) - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Adds an edge to this graph.
addEdge(Vertex, Vertex) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Adds an edge to this graph.
addEdge(Vertex, Vertex) - Method in class com.mhhe.clrs2e.FlowNetwork
Unsupported, since edges in a flow network must have capacities.
addEdge(Vertex, Vertex) - Method in interface com.mhhe.clrs2e.Graph
Adds an edge to this graph.
addEdge(Vertex, Vertex) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Unsupported, since edges in a weighted graph must have weights.
addEdge(Vertex, Vertex) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Unsupported, since edges in a weighted graph must have weights.
addEdge(Vertex, Vertex, double) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Adds a weighted edge to this graph.
addEdge(Vertex, Vertex, double) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Adds a weighted edge to this graph.
addEdge(Vertex, Vertex, double, double) - Method in class com.mhhe.clrs2e.FlowNetwork
Adds an edge (u,v) and its reverse edge (v,u) to this graph.
addVertex(int, String) - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Adds a vertex to this graph.
addVertex(int, String) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Adds a vertex to this graph.
addVertex(int, String) - Method in interface com.mhhe.clrs2e.Graph
Adds a vertex to this graph.
addVertex(String) - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Adds a vertex to this graph.
addVertex(String) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Adds a vertex to this graph.
addVertex(String) - Method in interface com.mhhe.clrs2e.Graph
Adds a vertex to this graph.
addVertex(Vertex) - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Adds a vertex to this graph, given a Vertex.
addVertex(Vertex) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Adds a vertex to this graph, given a Vertex.
addVertex(Vertex) - Method in interface com.mhhe.clrs2e.Graph
Adds a vertex to this graph, given a Vertex.
adj - Variable in class com.mhhe.clrs2e.AdjacencyListGraph
An array of adjacency lists.
AdjacencyListGraph - class com.mhhe.clrs2e.AdjacencyListGraph.
Implementation of a graph, using adjacency lists.
AdjacencyListGraph.AdjListInfo - class com.mhhe.clrs2e.AdjacencyListGraph.AdjListInfo.
Inner class for the adjacency list array.
AdjacencyListGraph.AdjListInfo(Vertex) - Constructor for class com.mhhe.clrs2e.AdjacencyListGraph.AdjListInfo
Makes an AdjListInfo object for an empty list.
AdjacencyListGraph.Edge - class com.mhhe.clrs2e.AdjacencyListGraph.Edge.
Inner class for adjacency list edges.
AdjacencyListGraph.Edge(Vertex, AdjacencyListGraph.Edge) - Constructor for class com.mhhe.clrs2e.AdjacencyListGraph.Edge
Creates a new edge.
AdjacencyListGraph.EdgeIterator - class com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator.
Inner class for an iterator that iterates through the edges incident on a given vertex.
AdjacencyListGraph.EdgeIterator(int) - Constructor for class com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
Starts an iteration through the edges incident on a given vertex.
AdjacencyListGraph.VertexIterator - class com.mhhe.clrs2e.AdjacencyListGraph.VertexIterator.
Inner class for a vertex iterator.
AdjacencyListGraph.VertexIterator() - Constructor for class com.mhhe.clrs2e.AdjacencyListGraph.VertexIterator
Starts an iteration through the vertices.
AdjacencyListGraph(int, boolean) - Constructor for class com.mhhe.clrs2e.AdjacencyListGraph
Creates an empty AdjacencyListGraph.
AdjacencyMatrixGraph - class com.mhhe.clrs2e.AdjacencyMatrixGraph.
Implementation of a graph, using an adjacency matrix.
AdjacencyMatrixGraph.EdgeIterator - class com.mhhe.clrs2e.AdjacencyMatrixGraph.EdgeIterator.
Inner class for an iterator that iterates through the edges incident on a given vertex.
AdjacencyMatrixGraph.EdgeIterator(int) - Constructor for class com.mhhe.clrs2e.AdjacencyMatrixGraph.EdgeIterator
Starts an iteration through the edges incident on a given vertex.
AdjacencyMatrixGraph.VertexIterator - class com.mhhe.clrs2e.AdjacencyMatrixGraph.VertexIterator.
Inner class for a vertex iterator.
AdjacencyMatrixGraph.VertexIterator() - Constructor for class com.mhhe.clrs2e.AdjacencyMatrixGraph.VertexIterator
Starts an iteration through the vertices.
AdjacencyMatrixGraph(int, boolean) - Constructor for class com.mhhe.clrs2e.AdjacencyMatrixGraph
Creates an empty AdjacencyMatrixGraph.
AllPairsShortestPaths - class com.mhhe.clrs2e.AllPairsShortestPaths.
Abstract class for computing all-pairs shortest paths.
AllPairsShortestPaths() - Constructor for class com.mhhe.clrs2e.AllPairsShortestPaths
 
append(DisjointSetLinkedList.DisjointSet, DisjointSetLinkedList.DisjointSet) - Method in class com.mhhe.clrs2e.DisjointSetLinkedList
Appends one set's list to another set's list.
APSPMatrixMult - class com.mhhe.clrs2e.APSPMatrixMult.
Abstract class that defines the extendShortestPaths method used by subclasses of AllPairsShortestPaths.
APSPMatrixMult() - Constructor for class com.mhhe.clrs2e.APSPMatrixMult
 
array - Variable in class com.mhhe.clrs2e.Heap
The array holding the heap.
AssemblyLine - class com.mhhe.clrs2e.AssemblyLine.
Implementation of assembly-line scheduling for two lines, as described in Section 15.1 of Introduction to Algorithms, Second edition.
AssemblyLine(double[][], double[][], double[], double[], int) - Constructor for class com.mhhe.clrs2e.AssemblyLine
Computes the fastest way through the factory, allocating the instance variables and storing the result in them.

B

b - Variable in class com.mhhe.clrs2e.DifferenceConstraints.Constraint
Value of bk.
b - Variable in class com.mhhe.clrs2e.LongestCommonSubsequence
The table entry used in constructing an LCS of prefixes Xi and Yj, for 0 ≤ im-1 and 0 ≤ jn-1.
BellmanFord - class com.mhhe.clrs2e.BellmanFord.
Implementation of the Bellman-Ford algorithm on page 588 of Introduction to Algorithms, Second edition.
BellmanFord(WeightedAdjacencyListGraph) - Constructor for class com.mhhe.clrs2e.BellmanFord
Sets up the instance variables, including allocation of the spInfo array but not allocation of the ShortestPathInfo objects referenced by the array.
BFS - class com.mhhe.clrs2e.BFS.
Class that performs a breadth-first search on a graph.
BFS() - Constructor for class com.mhhe.clrs2e.BFS
 
bfsInfo - Variable in class com.mhhe.clrs2e.BFS
Array of BFSInfo objects, one per vertex, to hold the result of the breadth-first search.
BFSInfo - class com.mhhe.clrs2e.BFSInfo.
Class for information determined about a vertex by breadth-first search.
BFSInfo() - Constructor for class com.mhhe.clrs2e.BFSInfo
Initializes the distance to the maximum integer value, the color to white, and the parent to null.
BinarySearchTree - class com.mhhe.clrs2e.BinarySearchTree.
Implements the Dictionary interface as a binary search tree from Chapter 12 of Introduction to Algorithms, Second edition.
BinarySearchTree.Node - class com.mhhe.clrs2e.BinarySearchTree.Node.
Inner class for a node of a binary search tree.
BinarySearchTree.Node(Comparable) - Constructor for class com.mhhe.clrs2e.BinarySearchTree.Node
Initializes a node with the data and makes other pointers nil.
BinarySearchTree.Visitor - interface com.mhhe.clrs2e.BinarySearchTree.Visitor.
Interface for when we visit a node during a walk.
BinarySearchTree() - Constructor for class com.mhhe.clrs2e.BinarySearchTree
Creates a binary search tree with just a nil, which is the root.
BinomialHeap - class com.mhhe.clrs2e.BinomialHeap.
Implementation of a binomial heap from Chapter 19 of Introduction to Algorithms, Second edition.
BinomialHeap.Handle - class com.mhhe.clrs2e.BinomialHeap.Handle.
Inner class for the handle given back to the caller upon an insertion.
BinomialHeap.Handle(BinomialHeap.Node) - Constructor for class com.mhhe.clrs2e.BinomialHeap.Handle
Saves the node in this Handle.
BinomialHeap.Node - class com.mhhe.clrs2e.BinomialHeap.Node.
Inner class for a node within a binomial heap.
BinomialHeap.Node(DynamicSetElement) - Constructor for class com.mhhe.clrs2e.BinomialHeap.Node
Creates a new node.
BinomialHeap() - Constructor for class com.mhhe.clrs2e.BinomialHeap
Creates an empty binomial heap.
binomialHeapMerge(BinomialHeap, BinomialHeap) - Static method in class com.mhhe.clrs2e.BinomialHeap
Merges the root lists of two binomial heaps together into a single root list.
binomialLink(BinomialHeap.Node, BinomialHeap.Node) - Method in class com.mhhe.clrs2e.BinomialHeap
Links one binomial tree to another.
bitMask - Variable in class com.mhhe.clrs2e.MultiplicationMethod
If the table size is a power of 2, the bit mask used.
BLACK - Static variable in class com.mhhe.clrs2e.RedBlackTree
Color for a black node.
blackHeight() - Method in class com.mhhe.clrs2e.RedBlackTree
Returns the number of black nodes from the root down to any leaf.
blackHeight(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.RedBlackTree
Returns the number of black nodes from a given node down to any leaf.
breadthFirstSearch(FlowNetwork, Vertex, Vertex) - Method in class com.mhhe.clrs2e.EdmondsKarp
Performs a breadth-first search in the Edmonds-Karp algorithm.
BTree - class com.mhhe.clrs2e.BTree.
Implementation of a B-tree from Chapter 18 of Introduction to Algorithms, Second edition.
BTree.BTreeHandle - class com.mhhe.clrs2e.BTree.BTreeHandle.
Class to define a handle returned by searches.
BTree.BTreeHandle(BTree.Node, int) - Constructor for class com.mhhe.clrs2e.BTree.BTreeHandle
Saves the node and index in the instance variables.
BTree.Node - class com.mhhe.clrs2e.BTree.Node.
Private inner class for a B-tree node.
BTree.Node(int, boolean) - Constructor for class com.mhhe.clrs2e.BTree.Node
Initializes the instance variables, including allocating the c array if this node is not a leaf.
BTree(int) - Constructor for class com.mhhe.clrs2e.BTree
Creates an empty B-tree.
BTreeInsertNonfull(DynamicSetElement) - Method in class com.mhhe.clrs2e.BTree.Node
Inserts a new element in this node, which is assumed to be nonfull.
BTreeSearch(Comparable) - Method in class com.mhhe.clrs2e.BTree.Node
Searches for a dynamic set element with a given key, starting at this node.
BTreeSplitChild(BTree.Node, int) - Method in class com.mhhe.clrs2e.BTree.Node
Splits this node, which is a full child of its parent, which is in turn a nonfull internal node.
bubbleUp(BinomialHeap.Node, boolean) - Method in class com.mhhe.clrs2e.BinomialHeap
Bubbles the value in node up in the binomial heap.
bubbleUp(int) - Method in class com.mhhe.clrs2e.MaxHeapPriorityQueue
Bubbles the element at a given index up in the heap until it is less than or equal to its parent.
bubbleUp(int) - Method in class com.mhhe.clrs2e.MinHeapPriorityQueue
Bubbles the element at a given index up in the heap until it is greater than or equal to its parent.
BucketSort - class com.mhhe.clrs2e.BucketSort.
Sorts an array of DoubleValued in the range [0, 1) via the bucket sort algorithm from page 174 of Introduction to Algorithms, Second edition.
BucketSort() - Constructor for class com.mhhe.clrs2e.BucketSort
 
buildHeap() - Method in class com.mhhe.clrs2e.Heap
Rearranges the array within the heap so that it complies with the heap property.

C

c - Variable in class com.mhhe.clrs2e.BTree.Node
Pointers to the children, if this node is not a leaf.
c - Variable in class com.mhhe.clrs2e.LongestCommonSubsequence
The length of an LCS of a subproblem.
c1 - Variable in class com.mhhe.clrs2e.QuadraticProbingHashTable
Constant used for quadratic probing.
c2 - Variable in class com.mhhe.clrs2e.QuadraticProbingHashTable
Constant used for quadratic probing.
calculateDigits(int, int) - Static method in class com.mhhe.clrs2e.RadixSort
Determines how many digits of a given radix are necessary.
capacity - Variable in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
The capacity c(u,v) of this edge (u,v).
cascadingCut(FibHeap.Node) - Method in class com.mhhe.clrs2e.FibHeap
Performs a cascading cut operation.
cast(Object) - Static method in class com.mhhe.clrs2e.DynamicSetElement.Helper
Casts an object to DynamicSetElement, throwing a ClassCastException if the object fails to implement the DynamicSetElement interface.
ChainedHashTable - class com.mhhe.clrs2e.ChainedHashTable.
Implements a hash table with chaining, as described on page 226 of Introduction to Algorithms, Second edition.
ChainedHashTable() - Constructor for class com.mhhe.clrs2e.ChainedHashTable
Creates a new chained hash table with 16 entries.
ChainedHashTable(int) - Constructor for class com.mhhe.clrs2e.ChainedHashTable
Creates a new chained hash table of a given size.
character - Variable in class com.mhhe.clrs2e.Huffman.PrefixCodeItem
The character that this entry represents.
child - Variable in class com.mhhe.clrs2e.BinomialHeap.Node
This node's leftmost child, or null if this node has no children.
child - Variable in class com.mhhe.clrs2e.FibHeap.Node
Some child of this node.
codeWord - Variable in class com.mhhe.clrs2e.Huffman.PrefixCodeItem
This character's codeword, once the Huffman tree has been constructed.
color - Variable in class com.mhhe.clrs2e.BFSInfo
This vertex's color.
color - Variable in class com.mhhe.clrs2e.DFSInfo
This vertex's color.
color - Variable in class com.mhhe.clrs2e.RedBlackTree.Node
The node's color, either RED or BLACK.
com.mhhe.clrs2e - package com.mhhe.clrs2e
 
comesAfter(Activity) - Method in class com.mhhe.clrs2e.Activity
Returns a boolean value indicating whether this activity starts no earlier than another finishes.
compare(Comparable, Comparable) - Method in class com.mhhe.clrs2e.MergeSort
Compares two objects, returning their relationship.
compareTo(DynamicSetElement, Object) - Static method in class com.mhhe.clrs2e.DynamicSetElement.Helper
Compares a DynamicSetElement to another object.
compareTo(Object) - Method in class com.mhhe.clrs2e.Activity
Compares this activity to another, based on their finish times.
compareTo(Object) - Method in class com.mhhe.clrs2e.BinarySearchTree.Node
Compares this node to another node.
compareTo(Object) - Method in class com.mhhe.clrs2e.Dijkstra.DijkstraInfo
Compares the key of this object's vertex to that of another.
compareTo(Object) - Method in interface com.mhhe.clrs2e.DynamicSetElement
Compares this DynamicSetElement to another object.
compareTo(Object) - Method in class com.mhhe.clrs2e.Heap.Handle
Compares the DynamicSetElement stored in this Handle to that stored in another.
compareTo(Object) - Method in class com.mhhe.clrs2e.Huffman.Node
Compares this node to another, based on their frequencies.
compareTo(Object) - Method in class com.mhhe.clrs2e.Interval
Compares this interval to another, based on their low endpoints.
compareTo(Object) - Method in class com.mhhe.clrs2e.Kruskal.WeightedEdge
Compares the weight of this WeightedEdge to that of another.
compareTo(Object) - Method in class com.mhhe.clrs2e.Prim.PrimInfo
Compares this object's key to that of another PrimInfo object.
computeD() - Method in class com.mhhe.clrs2e.FibHeap
Returns D(n) = floor(log base phi of n), where phi = (1 + sqrt(5)) / 2.
computeMaxFlow(FlowNetwork, Vertex, Vertex) - Method in class com.mhhe.clrs2e.EdmondsKarp
Finds a maximum flow in a flow network from a given source to a given sink.
computeMaxFlow(FlowNetwork, Vertex, Vertex) - Method in class com.mhhe.clrs2e.MaxFlow
Finds a maximum flow in a flow network from a given source to a given sink.
computeMST(WeightedAdjacencyListGraph) - Method in class com.mhhe.clrs2e.Kruskal
Computes the minimum spanning tree of a weighted, undirected graph.
computeMST(WeightedAdjacencyListGraph) - Method in interface com.mhhe.clrs2e.MST
Computes the minimum spanning tree of a weighted, undirected graph.
computeMST(WeightedAdjacencyListGraph) - Method in class com.mhhe.clrs2e.Prim
Computes the minimum spanning tree of a weighted, undirected graph.
computeShortestPaths() - Method in class com.mhhe.clrs2e.Johnson
Computes all-pairs shortest paths using Johnson's algorithm.
computeShortestPaths(Vertex) - Method in class com.mhhe.clrs2e.BellmanFord
Computes single-source shortest paths from a given source vertex, filling in weights and predecessors in the spInfo array.
computeShortestPaths(Vertex) - Method in class com.mhhe.clrs2e.DAGShortestPaths
Computes single-source shortest paths from a given source vertex, filling in weights and predecessors in the spInfo array.
computeShortestPaths(Vertex) - Method in class com.mhhe.clrs2e.Dijkstra
Computes single-source shortest paths from a given source vertex, filling in weights and predecessors in the spInfo array.
computeShortestPaths(Vertex) - Method in class com.mhhe.clrs2e.SingleSourceShortestPaths
Computes single-source shortest paths from a given source vertex, filling in weights and predecessors in the spInfo array.
computeShortestPaths(WeightedAdjacencyMatrixGraph) - Method in class com.mhhe.clrs2e.AllPairsShortestPaths
Computes all-pairs shortest paths.
computeShortestPaths(WeightedAdjacencyMatrixGraph) - Method in class com.mhhe.clrs2e.FasterAllPairsShortestPaths
Computes all-pairs shortest paths.
computeShortestPaths(WeightedAdjacencyMatrixGraph) - Method in class com.mhhe.clrs2e.FloydWarshall
Computes all-pairs shortest paths.
computeShortestPaths(WeightedAdjacencyMatrixGraph) - Method in class com.mhhe.clrs2e.SlowAllPairsShortestPaths
Computes all-pairs shortest paths.
computeTransitiveClosure(AdjacencyMatrixGraph) - Method in class com.mhhe.clrs2e.FloydWarshall
Computes the transitive closure of a directed graph.
concatenate(LinkedList) - Method in class com.mhhe.clrs2e.LinearDLL
Concatenates another linked list onto the end of this list, destroying the other linked list.
concatenate(LinkedList) - Method in class com.mhhe.clrs2e.LinkedList
Concatenates another linked list onto the end of this list, destroying the other linked list.
concatenate(LinkedList) - Method in class com.mhhe.clrs2e.SentinelDLL
 
ConnectedComponents - class com.mhhe.clrs2e.ConnectedComponents.
Runs the connected components algorithm on page 500 of Introduction to Algorithms, Second edition.
ConnectedComponents(Graph) - Constructor for class com.mhhe.clrs2e.ConnectedComponents
Creates disjoint sets for the connected components of a graph.
consolidate() - Method in class com.mhhe.clrs2e.FibHeap
Consolidates the root list of this Fibonacci heap.
constructTree(Huffman.PrefixCodeItem[]) - Method in class com.mhhe.clrs2e.Huffman
Creates a Huffman tree from an array of PrefixCodeItem.
CountingSort - class com.mhhe.clrs2e.CountingSort.
Sorts an array of NonNegativeInteger via the counting sort algorithm from page 168 of Introduction to Algorithms, Second edition.
CountingSort.CountingSortKeyExtractor - class com.mhhe.clrs2e.CountingSort.CountingSortKeyExtractor.
Inner class implementing KeyExtractor, in which each extract method just returns its argument.
CountingSort.CountingSortKeyExtractor() - Constructor for class com.mhhe.clrs2e.CountingSort.CountingSortKeyExtractor
 
CountingSort.KeyExtractor - interface com.mhhe.clrs2e.CountingSort.KeyExtractor.
Interface that allows us to pull out the sort key from an object.
CountingSort() - Constructor for class com.mhhe.clrs2e.CountingSort
Initializes max and extractor to defaults.
CountingSort(CountingSort.KeyExtractor) - Constructor for class com.mhhe.clrs2e.CountingSort
Initializes max to the default and extractor to its argument.
CountingSort(CountingSort.KeyExtractor, int) - Constructor for class com.mhhe.clrs2e.CountingSort
Initializes max and extractor to its arguments.
CountingSort(int) - Constructor for class com.mhhe.clrs2e.CountingSort
Initializes max to its argument and extractor to the default.
countingSort(NonNegativeInteger[]) - Method in class com.mhhe.clrs2e.CountingSort
Sorts an array of NonNegativeInteger.
countingSort(NonNegativeInteger[], int) - Method in class com.mhhe.clrs2e.CountingSort
Sorts an array of NonNegativeInteger, given the maximum value in the array.
countingSort(NonNegativeInteger[], NonNegativeInteger[], int) - Method in class com.mhhe.clrs2e.CountingSort
Sorts an array of NonNegativeInteger, given the maximum value in the array and array to sort into.
current - Variable in class com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
The edge returned by the most recent call to next.
current - Variable in class com.mhhe.clrs2e.AdjacencyMatrixGraph.EdgeIterator
The index of the vertex returned by the most recent call to next.
current - Variable in class com.mhhe.clrs2e.LinearDLL.LinearDLLIterator
A reference to the Node returned by the most recent call to next.
current - Variable in class com.mhhe.clrs2e.SentinelDLL.SentinelDLLIterator
A reference to the Node returned by the most recent call to next.
currentSCC - Variable in class com.mhhe.clrs2e.SCC.SecondDFS
The number of the current SCC.
cut(FibHeap.Node, FibHeap.Node) - Method in class com.mhhe.clrs2e.FibHeap
Cuts the link between a node and its parent.

D

d - Variable in class com.mhhe.clrs2e.BFSInfo
Distance of this vertex from the source.
d - Variable in class com.mhhe.clrs2e.DFSInfo
This vertex's discovery time.
d - Variable in class com.mhhe.clrs2e.ShortestPathInfo
The current shortest-path estimate for this vertex.
DAGShortestPaths - class com.mhhe.clrs2e.DAGShortestPaths.
Implementation of DAG-Shortest-Paths algorithm on page 592 of Introduction to Algorithms, Second edition.
DAGShortestPaths(WeightedAdjacencyListGraph) - Constructor for class com.mhhe.clrs2e.DAGShortestPaths
Sets up the instance variables, including allocation of the spInfo array but not allocation of the ShortestPathInfo objects referenced by the array.
data - Variable in class com.mhhe.clrs2e.BinarySearchTree.Node
The data stored in the node.
decode(int[], int) - Method in class com.mhhe.clrs2e.Huffman
Decodes an encoded string, where the encoding is bits packed into an array of int.
decode(String) - Method in class com.mhhe.clrs2e.Huffman
Decodes an encoded string, where the encoding is a String consisting of 0s and 1s.
decreaseKey(Object, Comparable) - Method in class com.mhhe.clrs2e.BinomialHeap
Decreases the key of a node.
decreaseKey(Object, Comparable) - Method in class com.mhhe.clrs2e.FibHeap
Decreases the key of a node.
decreaseKey(Object, Comparable) - Method in class com.mhhe.clrs2e.MinHeapPriorityQueue
Decreases the key of a given element to a new value.
decreaseKey(Object, Comparable) - Method in interface com.mhhe.clrs2e.MinPriorityQueue
Decreases the key of a given element to a new value.
degree - Variable in class com.mhhe.clrs2e.BinomialHeap.Node
The number of children that this node has.
degree - Variable in class com.mhhe.clrs2e.FibHeap.Node
How many children this node has.
delete(Comparable) - Method in class com.mhhe.clrs2e.BTree.Node
Deletes an element with a given key from the subtree rooted at this node.
delete(Object) - Method in class com.mhhe.clrs2e.BinarySearchTree
Removes a node from the tree.
delete(Object) - Method in class com.mhhe.clrs2e.BinomialHeap
Deletes a node.
delete(Object) - Method in class com.mhhe.clrs2e.BTree
Removes an element.
delete(Object) - Method in class com.mhhe.clrs2e.ChainedHashTable
Removes an element from a chained hash table.
delete(Object) - Method in interface com.mhhe.clrs2e.Dictionary
Removes an element.
delete(Object) - Method in class com.mhhe.clrs2e.DirectAddressTable
Removes an element from a direct-address table.
delete(Object) - Method in class com.mhhe.clrs2e.FibHeap
Deletes a node.
delete(Object) - Method in class com.mhhe.clrs2e.IntervalTree
Deletes a node from the tree.
delete(Object) - Method in class com.mhhe.clrs2e.LinearDLL
Removes an element.
delete(Object) - Method in class com.mhhe.clrs2e.LinkedList
Removes an element.
delete(Object) - Method in class com.mhhe.clrs2e.OpenAddressingHashTable
Removes an element.
delete(Object) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Deletes a node from the tree.
delete(Object) - Method in class com.mhhe.clrs2e.RedBlackTree
Removes a node from the tree.
delete(Object) - Method in class com.mhhe.clrs2e.SentinelDLL
Removes an element.
DELETED - Variable in class com.mhhe.clrs2e.OpenAddressingHashTable
Indicator that a slot used to hold an object but that object has been deleted from the hash table.
deleteFixup(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.RedBlackTree
Restores the red-black properties of the tree after a deletion.
deleteFromInternalNode(int) - Method in class com.mhhe.clrs2e.BTree.Node
Deletes a given key from this node, which is assumed to be an internal node and already in memory.
deleteFromLeaf(Comparable) - Method in class com.mhhe.clrs2e.BTree.Node
Deletes an element with a given key from this node, which is assumed to be a leaf and already in memory.
DeleteSentinelException - exception com.mhhe.clrs2e.DeleteSentinelException.
Exception thrown upon an attempt to delete the sentinel.
DeleteSentinelException() - Constructor for class com.mhhe.clrs2e.DeleteSentinelException
 
dequeue() - Method in class com.mhhe.clrs2e.QueueArray
Returns and removes the object at the head of the queue.
dequeue() - Method in interface com.mhhe.clrs2e.Queue
Returns and removes the object at the head of the queue.
dequeue() - Method in class com.mhhe.clrs2e.QueueList
Removes an element from the head of the queue.
dereference(Object) - Static method in class com.mhhe.clrs2e.BinarySearchTree
Returns the data stored in a node.
dereference(Object) - Method in class com.mhhe.clrs2e.BinomialHeap
Returns the String representation of a node's object.
dereference(Object) - Method in class com.mhhe.clrs2e.FibHeap
Returns the String representation of a node's object.
dereference(Object) - Static method in class com.mhhe.clrs2e.LinkedList
Returns the object stored in a node.
DeterministicSelect - class com.mhhe.clrs2e.DeterministicSelect.
Implements the OrderStatistics interface via the deterministic Select procedure (which runs in linear time in the worst case) from pages 189-190 of Introduction to Algorithms, Second edition.
DeterministicSelect() - Constructor for class com.mhhe.clrs2e.DeterministicSelect
Creates a Partitioner.
DFS - class com.mhhe.clrs2e.DFS.
Class that performs a depth-first search on a graph.
DFS() - Constructor for class com.mhhe.clrs2e.DFS
 
dfsInfo - Variable in class com.mhhe.clrs2e.DFS
Array of DFSInfo objects, one per vertex, to hold the result of the depth-first search.
DFSInfo - class com.mhhe.clrs2e.DFSInfo.
Class for information determined about a vertex by depth-first search.
DFSInfo() - Constructor for class com.mhhe.clrs2e.DFSInfo
Initializes the discovery and finish times to -1, the color to white, and the parent to null.
dfsVisit(AdjacencyListGraph, Vertex) - Method in class com.mhhe.clrs2e.DFS
Performs a depth-first search on a graph starting from a given vertex, filling in discovery times, finish times, and parents in the predecessor graph in the dfsInfo array.
Dictionary - interface com.mhhe.clrs2e.Dictionary.
Interface for dictionary data structures, defined on page 197 of Introduction to Algorithms, Second edition.
DifferenceConstraints - class com.mhhe.clrs2e.DifferenceConstraints.
Class for solving a system of difference constraints, as defined in Section 24.4 of Introduction to Algorithms, Second edition.
DifferenceConstraints.BadConstraintException - exception com.mhhe.clrs2e.DifferenceConstraints.BadConstraintException.
Inner class for a bad constraint exception.
DifferenceConstraints.BadConstraintException() - Constructor for class com.mhhe.clrs2e.DifferenceConstraints.BadConstraintException
 
DifferenceConstraints.Constraint - class com.mhhe.clrs2e.DifferenceConstraints.Constraint.
Inner class for an individual constraint.
DifferenceConstraints.Constraint(int, int, double) - Constructor for class com.mhhe.clrs2e.DifferenceConstraints.Constraint
Sets the values of the instance variables.
DifferenceConstraints() - Constructor for class com.mhhe.clrs2e.DifferenceConstraints
Creates an empty system of difference constraints.
digits - Variable in class com.mhhe.clrs2e.RadixSort
How many digits per key.
Dijkstra - class com.mhhe.clrs2e.Dijkstra.
Implementation of Dijkstra's algorithm on page 595 of Introduction to Algorithms, Second edition.
Dijkstra.DijkstraInfo - class com.mhhe.clrs2e.Dijkstra.DijkstraInfo.
Inner class to maintain the Vertex object, key, parent, and handle into the priority queue for each vertex.
Dijkstra.DijkstraInfo() - Constructor for class com.mhhe.clrs2e.Dijkstra.DijkstraInfo
Creates a DijkstraInfo object.
Dijkstra(WeightedAdjacencyListGraph) - Constructor for class com.mhhe.clrs2e.Dijkstra
Sets up the instance variables, including allocation of the spInfo array but not allocation of the ShortestPathInfo objects referenced by the array.
DirectAddressTable - class com.mhhe.clrs2e.DirectAddressTable.
Implements a direct-address table from page 222 of Introduction to Algorithms, Second edition.
DirectAddressTable(int) - Constructor for class com.mhhe.clrs2e.DirectAddressTable
Creates a new direct-address table of a given size.
directed - Variable in class com.mhhe.clrs2e.AdjacencyListGraph
true if this graph is directed, false if undirected.
directed - Variable in class com.mhhe.clrs2e.AdjacencyMatrixGraph
true if this graph is directed, false if undirected.
discover(AdjacencyListGraph, Vertex) - Method in class com.mhhe.clrs2e.DFS
Performs an action upon discovering a vertex in a graph.
DisjointSetForest - class com.mhhe.clrs2e.DisjointSetForest.
Disjoint-set forest implementation of disjoint-set union, as given on page 508 of Introduction to Algorithms, Second edition.
DisjointSetForest.Node - class com.mhhe.clrs2e.DisjointSetForest.Node.
Private inner class to serve as opaque handles.
DisjointSetForest.Node(Object) - Constructor for class com.mhhe.clrs2e.DisjointSetForest.Node
Makes a node for a given object.
DisjointSetForest() - Constructor for class com.mhhe.clrs2e.DisjointSetForest
 
DisjointSetLinkedList - class com.mhhe.clrs2e.DisjointSetLinkedList.
Linked-list implementation of disjoint-set union, using the weighted-union heuristic, as given on pages 502-503 of Introduction to Algorithms, Second edition.
DisjointSetLinkedList.DisjointSet - class com.mhhe.clrs2e.DisjointSetLinkedList.DisjointSet.
Private inner class for each disjoint set.
DisjointSetLinkedList.DisjointSet(DisjointSetLinkedList.Node) - Constructor for class com.mhhe.clrs2e.DisjointSetLinkedList.DisjointSet
Makes a singleton set with a given node.
DisjointSetLinkedList.DisjointSetUnionException - exception com.mhhe.clrs2e.DisjointSetLinkedList.DisjointSetUnionException.
Inner class for an exception that occurs if either set to be united is empty.
DisjointSetLinkedList.DisjointSetUnionException() - Constructor for class com.mhhe.clrs2e.DisjointSetLinkedList.DisjointSetUnionException
 
DisjointSetLinkedList.Node - class com.mhhe.clrs2e.DisjointSetLinkedList.Node.
Private inner class for nodes of the list.
DisjointSetLinkedList.Node(Object) - Constructor for class com.mhhe.clrs2e.DisjointSetLinkedList.Node
Makes a node for a given object.
DisjointSetLinkedList() - Constructor for class com.mhhe.clrs2e.DisjointSetLinkedList
 
DisjointSetUnion - interface com.mhhe.clrs2e.DisjointSetUnion.
Interface for a disjoint-set-union data structure from Chapter 21 of Introduction to Algorithms, Second edition.
diskRead() - Method in class com.mhhe.clrs2e.BTree.Node
Reads a disk block.
diskWrite() - Method in class com.mhhe.clrs2e.BTree.Node
Writes a disk block.
divisor - Variable in class com.mhhe.clrs2e.RadixSort.RadixKeyExtractor
The divisor for extracting.
DoubleHashingHashTable - class com.mhhe.clrs2e.DoubleHashingHashTable.
Implements a hash table with double hashing as described on pages 240-241 of Introduction to Algorithms, Second edition.
DoubleHashingHashTable() - Constructor for class com.mhhe.clrs2e.DoubleHashingHashTable
Creates a new open-addressed hash table with double hashing with 16 entries.
DoubleHashingHashTable(int) - Constructor for class com.mhhe.clrs2e.DoubleHashingHashTable
Creates a new open-addressed hash table with double hashing of a given size.
DoubleValued - interface com.mhhe.clrs2e.DoubleValued.
Interface for an object with a value that is a double.
DynamicSetElement - interface com.mhhe.clrs2e.DynamicSetElement.
Interface for an element in a dynamic set.
DynamicSetElement.Helper - class com.mhhe.clrs2e.DynamicSetElement.Helper.
Inner class to define static helper methods.
DynamicSetElement.Helper() - Constructor for class com.mhhe.clrs2e.DynamicSetElement.Helper
 

E

e - Variable in class com.mhhe.clrs2e.AdjacencyListGraph
How many edges this graph has.
e - Variable in class com.mhhe.clrs2e.AdjacencyMatrixGraph
How many edges this graph has.
edge - Variable in class com.mhhe.clrs2e.EdmondsKarp.EKInfo
The edge leading into this vertex in the breadth-first search tree.
edgeExists(int, int) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns a flag indicating whether an edge exists.
edgeExists(int, int) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Returns a flag indicating whether an edge exists.
edgeExists(Vertex, Vertex) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns a flag indicating whether an edge exists.
edgeExists(Vertex, Vertex) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Returns a flag indicating whether an edge exists.
edgeIterator(int) - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Returns an iterator that iterates through the edges incident on a given vertex.
edgeIterator(int) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns an iterator that iterates through the edges incident on a given vertex.
edgeIterator(int) - Method in class com.mhhe.clrs2e.FlowNetwork
Returns an iterator that iterates through all the edges (regardless of residual capacity) incident on a given vertex in a flow network.
edgeIterator(int) - Method in interface com.mhhe.clrs2e.Graph
Returns an iterator that iterates through the edges incident on a given vertex.
edgeIterator(int) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Returns an iterator that iterates through the weighted edges incident on a given vertex.
edgeIterator(int) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Returns an iterator that iterates through the weighted edges incident on a given vertex.
edgeIterator(Vertex) - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Returns an iterator that iterates through the edges incident on a given vertex.
edgeIterator(Vertex) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns an iterator that iterates through the edges incident on a given vertex.
edgeIterator(Vertex) - Method in class com.mhhe.clrs2e.FlowNetwork
Returns an iterator that iterates through all the edges (regardless of residual capacity) incident on a given vertex in a flow network.
edgeIterator(Vertex) - Method in interface com.mhhe.clrs2e.Graph
Returns an iterator that iterates through the edges incident on a given vertex.
edgeIterator(Vertex) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Returns an iterator that iterates through the weighted edges incident on a given vertex.
edgeIterator(Vertex) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Returns an iterator that iterates through the weighted edges incident on a given vertex.
EdmondsKarp - class com.mhhe.clrs2e.EdmondsKarp.
Implements the Edmonds-Karp algorithm for maximum flow from Section 26.2 of Introduction to Algorithms, Second edition.
EdmondsKarp.EKInfo - class com.mhhe.clrs2e.EdmondsKarp.EKInfo.
Inner class for the information found by a breadth-first search in the Edmonds-Karp algorithm.
EdmondsKarp.EKInfo() - Constructor for class com.mhhe.clrs2e.EdmondsKarp.EKInfo
Initializes this object to have no edge entering the vertex yet.
EdmondsKarp() - Constructor for class com.mhhe.clrs2e.EdmondsKarp
 
EMPTY - Static variable in class com.mhhe.clrs2e.StackArray
The index of the top when thestack is empty.
encodeLeaves(Huffman.Node, String) - Method in class com.mhhe.clrs2e.Huffman
Labels all leaves in a subtree with their appropriate codewords.
enqueue(Object) - Method in class com.mhhe.clrs2e.QueueArray
Adds an object to the tail of the queue.
enqueue(Object) - Method in interface com.mhhe.clrs2e.Queue
Adds an object to the tail of the queue.
enqueue(Object) - Method in class com.mhhe.clrs2e.QueueList
Inserts an element at the tail of the queue.
ensureFullEnough(int) - Method in class com.mhhe.clrs2e.BTree.Node
Ensures that a given child of this node child has at least t keys.
exchange(int, int) - Method in class com.mhhe.clrs2e.Heap
Swaps the elements at two indices.
exchange(int, int) - Method in class com.mhhe.clrs2e.MaxHeapPriorityQueue
Overrides the exchange method to update the index part of each Handle.
exchange(int, int) - Method in class com.mhhe.clrs2e.MinHeapPriorityQueue
Overrides the exchange method to update the index part of each Handle.
exchange(Object[], int, int) - Method in class com.mhhe.clrs2e.Partitioner
Exchanges the objects at two positions within an array.
extendShortestPaths(double[][], double[][]) - Method in class com.mhhe.clrs2e.APSPMatrixMult
Extends the shortest paths given in one matrix by the edge weights given in another matrix.
extract(int) - Method in interface com.mhhe.clrs2e.CountingSort.KeyExtractor
Extracts the key from an int.
extract(int) - Method in class com.mhhe.clrs2e.CountingSort.CountingSortKeyExtractor
Extracts the key from an int; an identity function.
extract(int) - Method in class com.mhhe.clrs2e.RadixSort.RadixKeyExtractor
Extracts the key from an int, where the key is the ith digit in base extractorRadix, and assuming that divisor equals extractorRadix^i.
extract(NonNegativeInteger) - Method in interface com.mhhe.clrs2e.CountingSort.KeyExtractor
Extracts the key from a NonNegativeInteger.
extract(NonNegativeInteger) - Method in class com.mhhe.clrs2e.CountingSort.CountingSortKeyExtractor
Extracts the key from a NonNegativeInteger; an identity function.
extract(NonNegativeInteger) - Method in class com.mhhe.clrs2e.RadixSort.RadixKeyExtractor
Extracts the key from an NonNegativeInteger, where the key is the ith digit in base extractorRadix, and assuming that divisor equals extractorRadix^i.
extractMax() - Method in class com.mhhe.clrs2e.MaxHeapPriorityQueue
Removes and returns the largest element in the max-priority queue.
extractMax() - Method in interface com.mhhe.clrs2e.MaxPriorityQueue
Removes and returns the largest element in the max-priority queue.
extractMin() - Method in class com.mhhe.clrs2e.BinomialHeap
Removes and returns the smallest object in the binomial heap.
extractMin() - Method in class com.mhhe.clrs2e.FibHeap
Removes and returns the smallest object in the Fibonacci heap.
extractMin() - Method in class com.mhhe.clrs2e.MergeableHeap
Removes and returns the smallest dynamic set element in the mergeable heap.
extractMin() - Method in class com.mhhe.clrs2e.MinHeapPriorityQueue
Removes and returns the smallest element in the min-priority queue.
extractMin() - Method in interface com.mhhe.clrs2e.MinPriorityQueue
Removes and returns the smallest element in the min-priority queue.
extractor - Variable in class com.mhhe.clrs2e.CountingSort
Used to generate the actual key.
extractorRadix - Variable in class com.mhhe.clrs2e.RadixSort.RadixKeyExtractor
The radix for extracting.

F

f - Variable in class com.mhhe.clrs2e.Activity
Finish time.
f - Variable in class com.mhhe.clrs2e.AssemblyLine
The value of an optimal solution to a subproblem.
f - Variable in class com.mhhe.clrs2e.DFSInfo
This vertex's finish time.
FasterAllPairsShortestPaths - class com.mhhe.clrs2e.FasterAllPairsShortestPaths.
Implements the Faster-All-Pairs-Shortest-Paths procedure on page 627 of Introduction to Algorithms, Second edition.
FasterAllPairsShortestPaths() - Constructor for class com.mhhe.clrs2e.FasterAllPairsShortestPaths
 
fastestWay(double[][], double[][], double[], double[], int) - Method in class com.mhhe.clrs2e.AssemblyLine
Computes the fastest way through the factory, storing the result in the instance variables.
FibHeap - class com.mhhe.clrs2e.FibHeap.
Implementation of a Fibonacci heap from Chapter 20 of Introduction to Algorithms, Second edition.
FibHeap.Node - class com.mhhe.clrs2e.FibHeap.Node.
Inner class for a node within a Fibonaaci heap.
FibHeap.Node(DynamicSetElement) - Constructor for class com.mhhe.clrs2e.FibHeap.Node
Creates a new node.
FibHeap() - Constructor for class com.mhhe.clrs2e.FibHeap
Creates an empty Fibonacci heap.
fibHeapLink(FibHeap.Node, FibHeap.Node) - Method in class com.mhhe.clrs2e.FibHeap
Links one root to another.
findFeasibleSolution() - Method in class com.mhhe.clrs2e.DifferenceConstraints
Finds a feasible solution to the system of difference constraints, if a feasible solution exists.
findGreatestInSubtree() - Method in class com.mhhe.clrs2e.BTree.Node
Finds the dynamic set element with the greatest key in the subtree rooted at this node.
findMax(NonNegativeInteger[]) - Method in class com.mhhe.clrs2e.CountingSort
Returns the maximum value in an array of NonNegativeInteger.
findSet(Object) - Method in class com.mhhe.clrs2e.DisjointSetForest
Returns the object that serves as the representative of the set containing an object.
findSet(Object) - Method in class com.mhhe.clrs2e.DisjointSetLinkedList
Returns the object that serves as the representative of the set containing an object.
findSet(Object) - Method in interface com.mhhe.clrs2e.DisjointSetUnion
Returns the object that serves as the representative of the set containing an object.
findSmallestInSubtree() - Method in class com.mhhe.clrs2e.BTree.Node
Finds the dynamic set element with the smallest key in the subtree rooted at this node.
finish(AdjacencyListGraph, Vertex) - Method in class com.mhhe.clrs2e.DFS
Performs an action upon finishing a vertex in a graph.
finish(AdjacencyListGraph, Vertex) - Method in class com.mhhe.clrs2e.SCC.FirstDFS
Overrides the DFS.finish(com.mhhe.clrs2e.AdjacencyListGraph, com.mhhe.clrs2e.Vertex) method to insert the finished vertex onto the front of the linked list.
finish(AdjacencyListGraph, Vertex) - Method in class com.mhhe.clrs2e.SCC.SecondDFS
Overrides the DFS.finish(com.mhhe.clrs2e.AdjacencyListGraph, com.mhhe.clrs2e.Vertex) method to assign the current SCC number to the vertex.
finish(AdjacencyListGraph, Vertex) - Method in class com.mhhe.clrs2e.TopoSort.TopoSortDFS
Overrides the DFS.finish(com.mhhe.clrs2e.AdjacencyListGraph, com.mhhe.clrs2e.Vertex) method to insert the finished vertex onto the front of the linked list.
FlowNetwork - class com.mhhe.clrs2e.FlowNetwork.
Implementation of a flow network, using adjacency lists.
FlowNetwork.EdgeIterator - class com.mhhe.clrs2e.FlowNetwork.EdgeIterator.
Inner class that overrides AdjacencyListGraph.EdgeIterator to implement FlowNetworkEdgeIterator.
FlowNetwork.EdgeIterator(int, boolean) - Constructor for class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
Starts an iteration through the edges incident on a given vertex in a flow network.
FlowNetwork.FlowNetworkEdge - class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge.
Inner class for flow network edges in adjacency lists.
FlowNetwork.FlowNetworkEdge(Vertex, AdjacencyListGraph.Edge, double) - Constructor for class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
Creates a new edge.
FlowNetwork(int) - Constructor for class com.mhhe.clrs2e.FlowNetwork
Creates an empty FlowNetwork.
FlowNetworkEdgeIterator - interface com.mhhe.clrs2e.FlowNetworkEdgeIterator.
Interface for an iterator that returns edges of a flow network.
flowNetworkEdgeIterator(int, boolean) - Method in class com.mhhe.clrs2e.FlowNetwork
Returns an iterator, of type FlowNetworkEdgeIterator (so that the caller does not need to cast the result), that iterates through the edges incident on a given vertex in a flow network.
flowNetworkEdgeIterator(Vertex, boolean) - Method in class com.mhhe.clrs2e.FlowNetwork
Returns an iterator, of type FlowNetworkEdgeIterator (so that the caller does not need to cast the result), that iterates through the edges incident on a given vertex in a flow network.
FloydWarshall - class com.mhhe.clrs2e.FloydWarshall.
Implements the Floyd-Warshall algorithm for all-pairs shortest paths from page 630 and the Transitive-Closure algorithm from page 633 of Introduction to Algorithms, Second edition.
FloydWarshall() - Constructor for class com.mhhe.clrs2e.FloydWarshall
 
free() - Method in class com.mhhe.clrs2e.BTree.Node
Frees this node.
frequency - Variable in class com.mhhe.clrs2e.Huffman.Node
The sum of the frequencies in all leaves of the subtree of which this node is the root.
fStar - Variable in class com.mhhe.clrs2e.AssemblyLine
The fastest way to get all the way through the factory.

G

g - Variable in class com.mhhe.clrs2e.Johnson
The weighted, directed graph.
g - Variable in class com.mhhe.clrs2e.SingleSourceShortestPaths
The graph for which we are computing single-source shortest paths.
generator - Variable in class com.mhhe.clrs2e.RandomizedPartitioner
A random-number generator.
getBFSInfo(int) - Method in class com.mhhe.clrs2e.BFS
Returns a reference to the BFSInfo object for a given vertex.
getBFSInfo(Vertex) - Method in class com.mhhe.clrs2e.BFS
Returns a reference to the BFSInfo object for a given vertex.
getBit(int[], int) - Method in class com.mhhe.clrs2e.Huffman
Returns a specific bit in an array of int.
getCapacity() - Method in interface com.mhhe.clrs2e.FlowNetworkEdgeIterator
Returns the capacity of the edge returned by the most recent call to next.
getCapacity() - Method in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
Returns the capacity of this edge.
getCapacity() - Method in class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
Returns the capacity of the edge returned by the most recent call to next.
getCardE() - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Returns the number of edges in this graph.
getCardE() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns the number of edges in this graph.
getCardE() - Method in interface com.mhhe.clrs2e.Graph
Returns the number of edges in this graph.
getCardV() - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Returns the number of vertices in this graph.
getCardV() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns the number of vertices in this graph.
getCardV() - Method in interface com.mhhe.clrs2e.Graph
Returns the number of vertices in this graph.
getChar() - Method in class com.mhhe.clrs2e.Huffman.PrefixCodeItem
Returns the character.
getCodeWord() - Method in class com.mhhe.clrs2e.Huffman.PrefixCodeItem
Returns the codeword.
getColor() - Method in class com.mhhe.clrs2e.BFSInfo
Returns the vertex's color.
getColor() - Method in class com.mhhe.clrs2e.DFSInfo
Returns the vertex's color.
getDFSInfo(int) - Method in class com.mhhe.clrs2e.DFS
Returns a reference to the DFSInfo object for a given vertex.
getDFSInfo(Vertex) - Method in class com.mhhe.clrs2e.DFS
Returns a reference to the DFSInfo object for a given vertex.
getDiscoveryTime() - Method in class com.mhhe.clrs2e.DFSInfo
Returns the vertex's discovery time.
getDistance() - Method in class com.mhhe.clrs2e.BFSInfo
Returns the vertex's distance.
getEdge() - Method in class com.mhhe.clrs2e.EdmondsKarp.EKInfo
Returns the edge entering the vertex.
getEdge() - Method in interface com.mhhe.clrs2e.FlowNetworkEdgeIterator
Returns the edge found by the most recent call to next.
getEdge() - Method in class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
Returns the edge found by the most recent call to next.
getEstimate() - Method in class com.mhhe.clrs2e.ShortestPathInfo
Returns the shortest-path estimate.
getFastestRoute() - Method in class com.mhhe.clrs2e.AssemblyLine
Returns the line numbers used in a fastest way through the factory.
getFastestTime() - Method in class com.mhhe.clrs2e.AssemblyLine
Returns the time taken by the fastest way to get all the way through the factory.
getFinishTime() - Method in class com.mhhe.clrs2e.DFSInfo
Returns the vertex's finish time.
getFlowValue(Vertex) - Method in class com.mhhe.clrs2e.FlowNetwork
Returns the value of the flow, which is the sum of the net flows out of the source.
getHigh() - Method in class com.mhhe.clrs2e.Interval
Returns the high endpoint of the interval.
getIndex() - Method in class com.mhhe.clrs2e.Vertex
Returns this vertex's index.
getKey() - Method in class com.mhhe.clrs2e.Dijkstra.DijkstraInfo
Returns the value of the key.
getKey() - Method in interface com.mhhe.clrs2e.DoubleValued
Returns the key (a double) of an object.
getKey() - Method in interface com.mhhe.clrs2e.DynamicSetElement
Returns the key of an element.
getKey() - Method in class com.mhhe.clrs2e.Huffman.Node
Returns the frequency as the key.
getKey() - Method in interface com.mhhe.clrs2e.NonNegativeInteger
 
getKey() - Method in class com.mhhe.clrs2e.Prim.PrimInfo
Returns the value of the key.
getLow() - Method in class com.mhhe.clrs2e.Interval
Returns the low endpoint of the interval.
getName() - Method in class com.mhhe.clrs2e.Vertex
Returns this vertex's name.
getNetFlow() - Method in interface com.mhhe.clrs2e.FlowNetworkEdgeIterator
Returns the net flow of the edge returned by the most recent call to next.
getNetFlow() - Method in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
Returns the net flow for this edge.
getNetFlow() - Method in class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
Returns the net flow of the edge returned by the most recent call to next.
getNumberOfKeys() - Method in class com.mhhe.clrs2e.OptimalBinarySearchTree
Returns the value of n.
getPredecessor() - Method in class com.mhhe.clrs2e.BFSInfo
Returns the vertex's parent in the predecessor graph.
getPredecessor() - Method in class com.mhhe.clrs2e.DFSInfo
Returns the vertex's parent in the predecessor graph.
getPredecessor() - Method in class com.mhhe.clrs2e.ShortestPathInfo
Returns the predecessor.
getResidualCapacity() - Method in interface com.mhhe.clrs2e.FlowNetworkEdgeIterator
Returns the residual capacity of the edge returned by the most recent call to next.
getResidualCapacity() - Method in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
Returns the residual capacity of this edge.
getResidualCapacity() - Method in class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
Returns the residual capacity of the edge returned by the most recent call to next.
getRootTable() - Method in class com.mhhe.clrs2e.OptimalBinarySearchTree
Returns the table of roots of subtrees.
getSCCNumber(int) - Method in class com.mhhe.clrs2e.SCC
Returns the SCC number for a given vertex.
getSCCNumber(Vertex) - Method in class com.mhhe.clrs2e.SCC
Returns the SCC number for a given vertex.
getShortestPathInfo(int) - Method in class com.mhhe.clrs2e.SingleSourceShortestPaths
Returns a reference to the ShortestPathInfo object for a given vertex.
getShortestPathInfo(int, int) - Method in class com.mhhe.clrs2e.Johnson
Returns a reference to the ShortestPathInfo object for a given pair of vertices.
getShortestPathInfo(Vertex) - Method in class com.mhhe.clrs2e.SingleSourceShortestPaths
Returns a reference to the ShortestPathInfo object for a given vertex.
getShortestPathInfo(Vertex, Vertex) - Method in class com.mhhe.clrs2e.Johnson
Returns a reference to the ShortestPathInfo object for a given pair of vertices.
getVertex(int) - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Returns the vertex with a given index.
getVertex(int) - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns the vertex with a given index.
getVertex(int) - Method in interface com.mhhe.clrs2e.Graph
Returns the vertex with a given index.
getWeight() - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph.WeightedEdge
Returns the weight of this edge.
getWeight() - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph.EdgeIterator
Returns the weight of the edge returned by the most recent call to next.
getWeight() - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph.EdgeIterator
Returns the weight of the edge returned by the most recent call to next.
getWeight() - Method in interface com.mhhe.clrs2e.WeightedEdgeIterator
Returns the weight of the edge returned by the most recent call to next.
getWeight(int, int) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Returns the weight of an edge.
getWeight(Vertex, Vertex) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Returns the weight of an edge.
Graph - interface com.mhhe.clrs2e.Graph.
Interface for graphs, both directed and undirected.
graphToMatrix(WeightedAdjacencyMatrixGraph) - Method in class com.mhhe.clrs2e.AllPairsShortestPaths
Converts a WeightedAdjacencyMatrixGraph to a matrix of edge weights.
GreedyActivitySelector - class com.mhhe.clrs2e.GreedyActivitySelector.
Implements the Greedy-Activity-Selector algorithm from page 378 of Introduction to Algorithms, Second edition.
GreedyActivitySelector() - Constructor for class com.mhhe.clrs2e.GreedyActivitySelector
 

H

h2(Object) - Method in class com.mhhe.clrs2e.DoubleHashingHashTable
An auxiliary hash function.
handle - Variable in class com.mhhe.clrs2e.BinomialHeap.Node
A handle to this node.
handle - Variable in class com.mhhe.clrs2e.ConnectedComponents
An array of handles mapping vertices to sets.
handle - Variable in class com.mhhe.clrs2e.Dijkstra.DijkstraInfo
A handle to the vertex's information in the priority queue, or null if the vertex is not in the priority queue.
handle - Variable in class com.mhhe.clrs2e.Prim.PrimInfo
A handle to the vertex's information in the priority queue, or null if the vertex is not in the priority queue.
hash(Object) - Method in class com.mhhe.clrs2e.MultiplicationMethod
Returns the hash value of an object, based on its Java hashCode value and the multiplication method.
hash(Object, int) - Method in class com.mhhe.clrs2e.DoubleHashingHashTable
Computes a hash function for an open-addressing hash table, uslng double hashing.
hash(Object, int) - Method in class com.mhhe.clrs2e.LinearProbingHashTable
Computes a hash function for an open-addressing hash table, uslng linear probing.
hash(Object, int) - Method in class com.mhhe.clrs2e.OpenAddressingHashTable
Computes a hash function for an open-addressing hash table, dependent on an object and a probe number.
hash(Object, int) - Method in class com.mhhe.clrs2e.QuadraticProbingHashTable
Computes a hash function for an open-addressing hash table, uslng quadratic probing.
hasher - Variable in class com.mhhe.clrs2e.ChainedHashTable
The class for the hash function used.
hasher - Variable in class com.mhhe.clrs2e.DoubleHashingHashTable
The class for the auxiliary hash function h2.
HashTableOverflow - exception com.mhhe.clrs2e.HashTableOverflow.
Exception thrown if an attempt is made to overfill an open-addressed hash table.
HashTableOverflow() - Constructor for class com.mhhe.clrs2e.HashTableOverflow
 
hasNext() - Method in class com.mhhe.clrs2e.AdjacencyListGraph.VertexIterator
Returns true if this vertex iterator has more vertices, false otherwise.
hasNext() - Method in class com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
Returns true if this edge iterator has more edges, false otherwise.
hasNext() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph.VertexIterator
Returns true if this vertex iterator has more vertices, false otherwise.
hasNext() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph.EdgeIterator
Returns true if this edge iterator has more edges, false otherwise.
hasNext() - Method in class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
Returns true if this edge iterator has more edges, false otherwise.
hasNext() - Method in class com.mhhe.clrs2e.LinearDLL.LinearDLLIterator
Returns true if this iterator has more elements, false otherwise.
hasNext() - Method in class com.mhhe.clrs2e.LinkedList.ListIterator
Returns true if this iterator has more elements, false otherwise.
hasNext() - Method in class com.mhhe.clrs2e.SentinelDLL.SentinelDLLIterator
Returns true if this iterator has more elements, false otherwise.
hasNext() - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph.EdgeIterator
Returns true if this edge iterator has more edges, false otherwise.
hasNoNegativeWeightCycle() - Method in class com.mhhe.clrs2e.Johnson
After running computeShortestPaths, returns true if no negative-weight cycles were detected, false if a negative-weight cycle was detected.
hasNoNegativeWeightCycle() - Method in class com.mhhe.clrs2e.SingleSourceShortestPaths
After running computeShortestPaths, returns true if no negative-weight cycles were detected, false if a negative-weight cycle was detected.
head - Variable in class com.mhhe.clrs2e.AdjacencyListGraph.AdjListInfo
The first edge in this vertex's adjacency list.
head - Variable in class com.mhhe.clrs2e.BinomialHeap
The head of the singly linked root list.
head - Variable in class com.mhhe.clrs2e.DisjointSetLinkedList.DisjointSet
The head of the list.
head - Variable in class com.mhhe.clrs2e.LinearDLL
The first node in the list.
head - Variable in class com.mhhe.clrs2e.QueueArray
The index of the head of the queue.
head() - Method in class com.mhhe.clrs2e.Heap
Returns the first element in the heap without removing it.
Heap - class com.mhhe.clrs2e.Heap.
Abstract base class for both binary min-heaps and binary max-heaps.
Heap.Handle - class com.mhhe.clrs2e.Heap.Handle.
Nested class for handles within a heap.
Heap.Handle(int, DynamicSetElement) - Constructor for class com.mhhe.clrs2e.Heap.Handle
Initializes a Handle.
Heap.Heapsort - class com.mhhe.clrs2e.Heap.Heapsort.
Implements the Sorter interface via heapsort.
Heap.Heapsort() - Constructor for class com.mhhe.clrs2e.Heap.Heapsort
 
Heap() - Constructor for class com.mhhe.clrs2e.Heap
Creates an empty heap.
Heap(Comparable[]) - Constructor for class com.mhhe.clrs2e.Heap
Makes a heap in place from the argument, and ensures that the heap property holds.
heapify(int) - Method in class com.mhhe.clrs2e.Heap
Restores the heap property.
heapify(int) - Method in class com.mhhe.clrs2e.MaxHeap
Restores the max-heap property.
heapify(int) - Method in class com.mhhe.clrs2e.MinHeap
Restores the min-heap property.
heapSize - Variable in class com.mhhe.clrs2e.Heap
How many elements are actually in the heap.
Heapsort - class com.mhhe.clrs2e.Heapsort.
A wrapper class to perform heapsort.
Heapsort() - Constructor for class com.mhhe.clrs2e.Heapsort
 
HeapUnderflowException - exception com.mhhe.clrs2e.HeapUnderflowException.
Exception thrown in case of a heap underflow.
HeapUnderflowException() - Constructor for class com.mhhe.clrs2e.HeapUnderflowException
 
high - Variable in class com.mhhe.clrs2e.Interval
High endpoint of the interval.
Huffman - class com.mhhe.clrs2e.Huffman.
Implements Huffman's algorithm as described in Section 16.3 of Introduction to Algorithms, Second edition.
Huffman.InternalNode - class com.mhhe.clrs2e.Huffman.InternalNode.
Inner class for an internal node in a Huffman tree.
Huffman.InternalNode(Huffman.Node, Huffman.Node) - Constructor for class com.mhhe.clrs2e.Huffman.InternalNode
Creates a new internal node.
Huffman.Node - class com.mhhe.clrs2e.Huffman.Node.
Inner class for a node in a Huffman tree.
Huffman.Node(double) - Constructor for class com.mhhe.clrs2e.Huffman.Node
Sets the frequency, based on the parameter.
Huffman.PrefixCodeItem - class com.mhhe.clrs2e.Huffman.PrefixCodeItem.
Inner class for an item in a prefix code.
Huffman.PrefixCodeItem(char, double) - Constructor for class com.mhhe.clrs2e.Huffman.PrefixCodeItem
Creates a new item in a prefix code.
Huffman(Huffman.PrefixCodeItem[]) - Constructor for class com.mhhe.clrs2e.Huffman
Creates a Huffman tree from an array of PrefixCodeItem.

I

i - Variable in class com.mhhe.clrs2e.BTree.BTreeHandle
Index of the key in the node.
i - Variable in class com.mhhe.clrs2e.DifferenceConstraints.Constraint
Index of the variable xi in the constraint.
increaseKey(Object, Comparable) - Method in class com.mhhe.clrs2e.MaxHeapPriorityQueue
Increases the key of a given element to a new value.
increaseKey(Object, Comparable) - Method in interface com.mhhe.clrs2e.MaxPriorityQueue
Increases the key of a given element to a new value.
increaseNetFlow(double) - Method in interface com.mhhe.clrs2e.FlowNetworkEdgeIterator
Increases the net flow of the edge returned by the most recent call to next.
increaseNetFlow(double) - Method in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
Increases the net flow on this edge by the given amount, decreases the net flow on the reverse edge by the same amount, and updates the residual capacities of this edge and the reverse edge.
increaseNetFlow(double) - Method in class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
Increases the net flow of the edge returned by the most recent call to next.
index - Variable in class com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
The index of the vertex whose edges this iterator iterates through.
index - Variable in class com.mhhe.clrs2e.Heap.Handle
Index into the heap array.
index - Variable in class com.mhhe.clrs2e.Vertex
Index of this vertex in its graph, 0 to cardV-1.
index(String, int) - Method in class com.mhhe.clrs2e.LongestCommonSubsequence
Returns a given character from a String.
indexOf(Comparable) - Method in class com.mhhe.clrs2e.DirectAddressTable
Returns the index into the direct-address table at which an element is placed.
info - Variable in class com.mhhe.clrs2e.Heap.Handle
The information actually stored.
info - Variable in class com.mhhe.clrs2e.LinkedList.Node
An object stored in the node.
initChainedHashTable(int) - Method in class com.mhhe.clrs2e.ChainedHashTable
Initializes a chained hash table of a given size.
initializeSingleSource(Vertex) - Method in class com.mhhe.clrs2e.SingleSourceShortestPaths
Initializes a single-source shortest-paths algorithm.
initOpenAddressingHashTable(int) - Method in class com.mhhe.clrs2e.OpenAddressingHashTable
Initializes an open-addressed hash table of a given size.
inorderWalk(BinarySearchTree.Node, BinarySearchTree.Visitor) - Method in class com.mhhe.clrs2e.BinarySearchTree
Performs an inorder walk of the the subtree rooted at a node, applying a Visitor to each node in the subtree.
inorderWalk(BinarySearchTree.Visitor) - Method in class com.mhhe.clrs2e.BinarySearchTree
Traverses the tree in inorder applying a Visitor to each node.
insert(Comparable) - Method in class com.mhhe.clrs2e.BinarySearchTree
Inserts data into the tree, creating a new node for this data.
insert(Comparable) - Method in class com.mhhe.clrs2e.BTree
Inserts an element.
insert(Comparable) - Method in class com.mhhe.clrs2e.ChainedHashTable
Inserts an element into a chained hash table.
insert(Comparable) - Method in interface com.mhhe.clrs2e.Dictionary
Inserts an element that implements Comparable.
insert(Comparable) - Method in class com.mhhe.clrs2e.DirectAddressTable
Inserts an element into a direct-address table.
insert(Comparable) - Method in class com.mhhe.clrs2e.IntervalTree
Inserts an interval into the tree, creating a new node for this interval.
insert(Comparable) - Method in class com.mhhe.clrs2e.LinearDLLDictionary
Inserts an element at the head of the list.
insert(Comparable) - Method in class com.mhhe.clrs2e.OpenAddressingHashTable
Inserts an element that implements Comparable.
insert(Comparable) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Inserts data into the tree, creating a new node for this data.
insert(Comparable) - Method in class com.mhhe.clrs2e.RedBlackTree
Inserts data into the tree, creating a new node for this data.
insert(Comparable) - Method in class com.mhhe.clrs2e.SentinelDLLDictionary
Inserts an element at the head of the list.
insert(DynamicSetElement) - Method in class com.mhhe.clrs2e.BinomialHeap
Inserts a dynamic set element into the binomial heap.
insert(DynamicSetElement) - Method in class com.mhhe.clrs2e.FibHeap
Inserts a dynamic set element into the Fibonacci heap.
insert(DynamicSetElement) - Method in class com.mhhe.clrs2e.MaxHeapPriorityQueue
Inserts a dynamic-set element into the max-priority queue.
insert(DynamicSetElement) - Method in interface com.mhhe.clrs2e.MaxPriorityQueue
Inserts a dynamic-set element into the max-priority queue.
insert(DynamicSetElement) - Method in class com.mhhe.clrs2e.MergeableHeap
Inserts a dynamic set element into the mergeable heap.
insert(DynamicSetElement) - Method in class com.mhhe.clrs2e.MinHeapPriorityQueue
Inserts a dynamic-set element into the min-priority queue.
insert(DynamicSetElement) - Method in interface com.mhhe.clrs2e.MinPriorityQueue
Inserts a dynamic-set element into the min-priority queue.
insert(Object) - Method in class com.mhhe.clrs2e.LinearDLLDictionary
Inserts an element at the head of the list.
insert(Object) - Method in class com.mhhe.clrs2e.LinearDLL
Inserts an element at the head of the list.
insert(Object) - Method in class com.mhhe.clrs2e.LinkedList
Inserts an element at the head of the list.
insert(Object) - Method in class com.mhhe.clrs2e.SentinelDLLDictionary
Inserts an element at the head of the list.
insert(Object) - Method in class com.mhhe.clrs2e.SentinelDLL
Inserts an element at the head of the list.
insertAfter(Object, Object) - Method in class com.mhhe.clrs2e.LinearDLLDictionary
Inserts an element after a given element.
insertAfter(Object, Object) - Method in class com.mhhe.clrs2e.LinearDLL
Inserts an element after a given element.
insertAfter(Object, Object) - Method in class com.mhhe.clrs2e.LinkedList
Inserts an element after a given element.
insertAfter(Object, Object) - Method in class com.mhhe.clrs2e.SentinelDLLDictionary
Inserts an element after a given element.
insertAfter(Object, Object) - Method in class com.mhhe.clrs2e.SentinelDLL
Inserts an element after a given element.
insertAtTail(Object) - Method in class com.mhhe.clrs2e.SentinelDLLDictionary
Inserts an element at the tail of the list.
insertAtTail(Object) - Method in class com.mhhe.clrs2e.SentinelDLL
Inserts an element at the tail of the list.
insertFixup(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.RedBlackTree
Restores the red-black conditions of the tree after inserting a node.
InsertionSort - class com.mhhe.clrs2e.InsertionSort.
Implements the Sorter interface via insertion sort from page 17 of Introduction to Algorithms, Second edition.
InsertionSort() - Constructor for class com.mhhe.clrs2e.InsertionSort
 
insertionSortSubarray(Comparable[], int, int) - Method in class com.mhhe.clrs2e.DeterministicSelect
Sorts a small subarray.
Interval - class com.mhhe.clrs2e.Interval.
Implements an interval whose endpoints are real numbers.
Interval(double, double) - Constructor for class com.mhhe.clrs2e.Interval
Initializes the endpoints of the interval.
IntervalTree - class com.mhhe.clrs2e.IntervalTree.
Implements an interval tree as described in Section 14.3 of Introduction to Algorithms, Second edition.
IntervalTree.Node - class com.mhhe.clrs2e.IntervalTree.Node.
Inner class for an interval tree node, extending a red-black tree node with an additional max field.
IntervalTree.Node(Interval) - Constructor for class com.mhhe.clrs2e.IntervalTree.Node
Initializes a new node in an interval tree.
IntervalTree() - Constructor for class com.mhhe.clrs2e.IntervalTree
Creates an empty interval tree with just a nil, which is the root.
isDirected() - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Returns true if this graph is directed, false if undirected.
isDirected() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns true if this graph is directed, false if undirected.
isDirected() - Method in interface com.mhhe.clrs2e.Graph
Returns true if this graph is directed, false if undirected.
isEmpty() - Method in class com.mhhe.clrs2e.Heap
Returns true if the heap is empty, false otherwise.
isEmpty() - Method in class com.mhhe.clrs2e.LinearDLL
Returns true if this list is empty, false otherwise.
isEmpty() - Method in class com.mhhe.clrs2e.LinkedList
Returns true if this list is empty, false otherwise.
isEmpty() - Method in interface com.mhhe.clrs2e.MaxPriorityQueue
Returns true if the max-priority queue is empty, false if non-empty.
isEmpty() - Method in interface com.mhhe.clrs2e.MinPriorityQueue
Returns true if the min-priority queue is empty, false if non-empty.
isEmpty() - Method in class com.mhhe.clrs2e.QueueArray
Returns true if the queue is empty, false otherwise.
isEmpty() - Method in interface com.mhhe.clrs2e.Queue
Returns true if the queue is empty, false otherwise.
isEmpty() - Method in class com.mhhe.clrs2e.QueueList
Returns true if the list is empty (containing only its sentinel), and false otherwise.
isEmpty() - Method in class com.mhhe.clrs2e.SentinelDLL
Returns true if this list is empty, false otherwise.
isEmpty() - Method in class com.mhhe.clrs2e.StackArray
Returns true if the stack is empty, false otherwise.
isEmpty() - Method in interface com.mhhe.clrs2e.Stack
Returns true if the stack is empty, false otherwise.
isNil(Object) - Method in class com.mhhe.clrs2e.BinarySearchTree
Returns true if the given node is the sentinel nil, false otherwise.
isPowerOf2 - Variable in class com.mhhe.clrs2e.MultiplicationMethod
true if the table size is a power of 2, false otherwise.
iterativeSearch(Comparable) - Method in class com.mhhe.clrs2e.BinarySearchTree
Searches the tree for a node with a given key.
iterator() - Method in class com.mhhe.clrs2e.LinearDLL
Creates and returns an Iterator object for this list.
iterator() - Method in class com.mhhe.clrs2e.LinkedList
Creates and returns an Iterator object for this list.
iterator() - Method in class com.mhhe.clrs2e.SentinelDLL
Creates and returns an Iterator object for this list.

J

j - Variable in class com.mhhe.clrs2e.DifferenceConstraints.Constraint
Index of the variable xj in the constraint.
Johnson - class com.mhhe.clrs2e.Johnson.
Class to implement Johnson's all-pairs shortest-paths algorithm on page 639 of Introduction to Algorithms, Second edition.
Johnson(WeightedAdjacencyListGraph) - Constructor for class com.mhhe.clrs2e.Johnson
Initializes the instance variables, except for allocating the acutal ShortestPathInfo objects in spInfo.

K

key - Variable in class com.mhhe.clrs2e.BTree.Node
Array of the keys stored in the node.
key - Variable in class com.mhhe.clrs2e.Prim.PrimInfo
Vertex's key, representing the weight of the lightest edge between this vertex and some vertex known to be in the minimum spanning tree.
KeyUpdateException - exception com.mhhe.clrs2e.KeyUpdateException.
Exception thrown in case of a bad increase/decrease key operation.
KeyUpdateException() - Constructor for class com.mhhe.clrs2e.KeyUpdateException
 
Kruskal - class com.mhhe.clrs2e.Kruskal.
Implements Kruskal's algorithm for minimum spanning tree from page 569 of Introduction to Algorithms, Second edition.
Kruskal.WeightedEdge - class com.mhhe.clrs2e.Kruskal.WeightedEdge.
Inner class for weighted edges so that the edges can be sorted and considered in nondecreasing order by weight.
Kruskal.WeightedEdge(Vertex, Vertex, double) - Constructor for class com.mhhe.clrs2e.Kruskal.WeightedEdge
Stores the vertices and edge weight into the instance variables.
Kruskal() - Constructor for class com.mhhe.clrs2e.Kruskal
 

L

l - Variable in class com.mhhe.clrs2e.AssemblyLine
The station used in an optimal solution to a subproblem.
lastAdded - Variable in class com.mhhe.clrs2e.AdjacencyListGraph
The index of the last vertex added to this graph.
lastAdded - Variable in class com.mhhe.clrs2e.AdjacencyMatrixGraph
The index of the last vertex added to this graph.
lastVisited - Variable in class com.mhhe.clrs2e.AdjacencyListGraph.VertexIterator
The index of the vertex returned by the most recent call to next.
lastVisited - Variable in class com.mhhe.clrs2e.AdjacencyMatrixGraph.VertexIterator
The index of the vertex returned by the most recent call to next.
lcsLength(String, String) - Method in class com.mhhe.clrs2e.LongestCommonSubsequence
Computes an LCS of two strings, storing the result in the instance variables.
leaf - Variable in class com.mhhe.clrs2e.BTree.Node
true if this node is a leaf, false if this node is an interior node.
left - Variable in class com.mhhe.clrs2e.BinarySearchTree.Node
The node's left child.
left - Variable in class com.mhhe.clrs2e.FibHeap.Node
This node's left sibling.
left - Variable in class com.mhhe.clrs2e.Huffman.InternalNode
This node's left child.
LEFT - Static variable in class com.mhhe.clrs2e.LongestCommonSubsequence
 
left(int) - Static method in class com.mhhe.clrs2e.Heap
Returns the index of the left child of a node.
leftRotate(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.IntervalTree
Calls RedBlackTree's RedBlackTree.leftRotate(com.mhhe.clrs2e.RedBlackTree.Node) and then fixes the max fields.
leftRotate(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Calls RedBlackTree's RedBlackTree.leftRotate(com.mhhe.clrs2e.RedBlackTree.Node) and then fixes the size fields.
leftRotate(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.RedBlackTree
Performs a left rotation on a node, making the node's right child its parent.
LinearDLL - class com.mhhe.clrs2e.LinearDLL.
A simple linear, doubly linked list without a sentinel from pages 205-206 of Introduction to Algorithms, Second edition.
LinearDLL.LinearDLLIterator - class com.mhhe.clrs2e.LinearDLL.LinearDLLIterator.
Inner class for an iterator.
LinearDLL.LinearDLLIterator() - Constructor for class com.mhhe.clrs2e.LinearDLL.LinearDLLIterator
Starts an iteration.
LinearDLL() - Constructor for class com.mhhe.clrs2e.LinearDLL
Makes an empty list.
LinearDLLDictionary - class com.mhhe.clrs2e.LinearDLLDictionary.
A simple linear, doubly linked list without a sentinel but with a search method.
LinearDLLDictionary() - Constructor for class com.mhhe.clrs2e.LinearDLLDictionary
 
LinearProbingHashTable - class com.mhhe.clrs2e.LinearProbingHashTable.
Implements a hash table with linear probing as described on page 239 of Introduction to Algorithms, Second edition.
LinearProbingHashTable() - Constructor for class com.mhhe.clrs2e.LinearProbingHashTable
Creates a new open-addressed hash table with linear probing with 16 entries.
LinearProbingHashTable(int) - Constructor for class com.mhhe.clrs2e.LinearProbingHashTable
Creates a new open-addressed hash table with linear probing of a given size.
link(DisjointSetForest.Node, DisjointSetForest.Node) - Method in class com.mhhe.clrs2e.DisjointSetForest
Links together two sets, given their root nodes.
LinkedList - class com.mhhe.clrs2e.LinkedList.
Abstract class for a doubly linked list in Section 10.2 of Introduction to Algorithms, Second edition.
LinkedList.ListIterator - class com.mhhe.clrs2e.LinkedList.ListIterator.
Abstract inner class for an iterator.
LinkedList.ListIterator() - Constructor for class com.mhhe.clrs2e.LinkedList.ListIterator
 
LinkedList.Node - class com.mhhe.clrs2e.LinkedList.Node.
Inner class for nodes of a linked list.
LinkedList.Node() - Constructor for class com.mhhe.clrs2e.LinkedList.Node
Makes an empty node.
LinkedList.Node(Object) - Constructor for class com.mhhe.clrs2e.LinkedList.Node
Makes a node storing an object.
LinkedList() - Constructor for class com.mhhe.clrs2e.LinkedList
 
list - Variable in class com.mhhe.clrs2e.QueueList
The list implementing the queue.
list - Variable in class com.mhhe.clrs2e.SCC
A list of vertices.
list - Variable in class com.mhhe.clrs2e.TopoSort
A linked list of vertices.
LongestCommonSubsequence - class com.mhhe.clrs2e.LongestCommonSubsequence.
Implements the dynamic-programming algorithm to find a longest common subsequence of two strings, as described in Section 15.4 of Introduction to Algorithms, Second edition.
LongestCommonSubsequence.Direction - class com.mhhe.clrs2e.LongestCommonSubsequence.Direction.
Inner class for a typesafe enum pattern for directions in a two-dimensional array.
LongestCommonSubsequence.Direction(String) - Constructor for class com.mhhe.clrs2e.LongestCommonSubsequence.Direction
Creates a new Direction.
LongestCommonSubsequence(String, String) - Constructor for class com.mhhe.clrs2e.LongestCommonSubsequence
Computes an LCS of two strings, allocating the instance variables and storing the result in them.
low - Variable in class com.mhhe.clrs2e.Interval
Low endpoint of the interval.
lStar - Variable in class com.mhhe.clrs2e.AssemblyLine
The line whose station n is used in a fastest way through the factory.

M

m - Variable in class com.mhhe.clrs2e.DirectAddressTable
The number of entries in the direct-address table.
m - Variable in class com.mhhe.clrs2e.LongestCommonSubsequence
How many entries are in X.
m - Variable in class com.mhhe.clrs2e.MatrixChainMultiply
The value of an optimal solution to a subproblem.
m - Variable in class com.mhhe.clrs2e.OpenAddressingHashTable
How many slots are in the hash table.
makeEmptyGraph(int, boolean) - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Creates and returns an empty AdjacencyListGraph with no edges, given the number of vertices and a boolean indicating whether the graph is directed.
makeEmptyGraph(int, boolean) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Creates and returns an empty WeightedAdjacencyListGraph with no edges, given the number of vertices and a boolean indicating whether the graph is directed.
makeSet(Object) - Method in class com.mhhe.clrs2e.DisjointSetForest
Makes a singleton set containing an object.
makeSet(Object) - Method in class com.mhhe.clrs2e.DisjointSetLinkedList
Makes a singleton set containing an object.
makeSet(Object) - Method in interface com.mhhe.clrs2e.DisjointSetUnion
Makes a singleton set containing an object.
makeSorter() - Method in class com.mhhe.clrs2e.Heap
Returns a Heap.Heapsort object that will sort this heap.
mark - Variable in class com.mhhe.clrs2e.FibHeap.Node
true if this node is marked, false if not marked.
mark(Object) - Method in class com.mhhe.clrs2e.FibHeap
Marks a node.
MatrixChainMultiply - class com.mhhe.clrs2e.MatrixChainMultiply.
Implements the dynamic-programming algorithm to determine the optimal order in which to multiply a chain of matrices, as described in Section 15.2 of Introduction to Algorithms, Second edition.
MatrixChainMultiply(int[]) - Constructor for class com.mhhe.clrs2e.MatrixChainMultiply
Computes an optimal parenthesization of a matrix-chain product, allocating the instance variables and storing the result in them.
matrixChainOrder(int[]) - Method in class com.mhhe.clrs2e.MatrixChainMultiply
Computes an optimal parenthesization of a matrix-chain product, storing the result in the instance variables.
max - Variable in class com.mhhe.clrs2e.CountingSort
Maximum value in the array.
max - Variable in class com.mhhe.clrs2e.IntervalTree.Node
Maximum value in the subtree rooted at this node.
MaxFlow - class com.mhhe.clrs2e.MaxFlow.
Abstract class for a maximum-flow algorithm.
MaxFlow() - Constructor for class com.mhhe.clrs2e.MaxFlow
 
MaxHeap - class com.mhhe.clrs2e.MaxHeap.
Implements a binary max-heap, based on Chapter 6 of Introduction to Algorithms, Second edition.
MaxHeap() - Constructor for class com.mhhe.clrs2e.MaxHeap
Creates an empty max-heap.
MaxHeap(Comparable[]) - Constructor for class com.mhhe.clrs2e.MaxHeap
Makes a max-heap in place from the argument, and ensures that the max-heap property holds.
MaxHeapPriorityQueue - class com.mhhe.clrs2e.MaxHeapPriorityQueue.
Implements a max-priority queue by a max-heap, based on Chapter 6 of Introduction to Algorithms, Second edition.
MaxHeapPriorityQueue() - Constructor for class com.mhhe.clrs2e.MaxHeapPriorityQueue
Creates an empty max-priority queue.
maximum() - Method in class com.mhhe.clrs2e.BinarySearchTree
Returns the node with the maximum key in the tree.
maximum() - Method in class com.mhhe.clrs2e.MaxHeapPriorityQueue
Returns the largest element in the max-priority queue without removing the element.
maximum() - Method in interface com.mhhe.clrs2e.MaxPriorityQueue
Returns the largest element in the max-priority queue without removing the element.
maximum(Comparable[]) - Static method in class com.mhhe.clrs2e.MinMax
Returns the largest element in an array.
maxKeys - Variable in class com.mhhe.clrs2e.BTree
The maximum number of keys in any node, = 2t-1.
MaxPriorityQueue - interface com.mhhe.clrs2e.MaxPriorityQueue.
Interface for a max-priority queue.
merge(Comparable[], int, int, int) - Method in class com.mhhe.clrs2e.MergeSort
Merges two sorted subarrays array[p..q] and array[q+1..r].
MergeableHeap - class com.mhhe.clrs2e.MergeableHeap.
Abstract class for mergeable heap data structures, defined on page 455 of Introduction to Algorithms, Second edition.
MergeableHeap() - Constructor for class com.mhhe.clrs2e.MergeableHeap
 
MergeSort - class com.mhhe.clrs2e.MergeSort.
Implements the Sorter interface via merge sort from pages 29 and 32 of Introduction to Algorithms, Second edition.
MergeSort() - Constructor for class com.mhhe.clrs2e.MergeSort
 
mergeSort(Comparable[], int, int) - Method in class com.mhhe.clrs2e.MergeSort
Recursive merge sort procedure to sort the subarray array[p..r].
min - Variable in class com.mhhe.clrs2e.FibHeap
The node in root list with the minimum key.
MinHeap - class com.mhhe.clrs2e.MinHeap.
Implements a binary min-heap, based on Chapter 6 of Introduction to Algorithms, Second edition.
MinHeap() - Constructor for class com.mhhe.clrs2e.MinHeap
Creates an empty min-heap.
MinHeap(Comparable[]) - Constructor for class com.mhhe.clrs2e.MinHeap
Makes a min-heap in place from the argument, and ensures that the min-heap property holds.
MinHeapPriorityQueue - class com.mhhe.clrs2e.MinHeapPriorityQueue.
Implements a min-priority queue by a min-heap, based on Chapter 6 of Introduction to Algorithms, Second edition.
MinHeapPriorityQueue() - Constructor for class com.mhhe.clrs2e.MinHeapPriorityQueue
Creates an empty min-priority queue.
minimum() - Method in class com.mhhe.clrs2e.BinarySearchTree
Returns the node with the minimum key in the tree.
minimum() - Method in class com.mhhe.clrs2e.BinomialHeap
Returns the object whose key is minimum.
minimum() - Method in class com.mhhe.clrs2e.FibHeap
Returns the object whose key is minimum.
minimum() - Method in class com.mhhe.clrs2e.MergeableHeap
Returns the dynamic set element whose key is minimum.
minimum() - Method in class com.mhhe.clrs2e.MinHeapPriorityQueue
Returns the smallest element in the min-priority queue without removing the element.
minimum() - Method in interface com.mhhe.clrs2e.MinPriorityQueue
Returns the smallest element in the min-priority queue without removing the element.
minimum(Comparable[]) - Static method in class com.mhhe.clrs2e.MinMax
Returns the smallest element in an array.
MinMax - class com.mhhe.clrs2e.MinMax.
Implements Minimum and Maximum from page 184 of Introduction to Algorithms, Second edition.
MinMax() - Constructor for class com.mhhe.clrs2e.MinMax
 
MinPriorityQueue - interface com.mhhe.clrs2e.MinPriorityQueue.
Interface for a min-priority queue.
MST - interface com.mhhe.clrs2e.MST.
Interface for a class that computes a minimum spanning tree.
MultiplicationMethod - class com.mhhe.clrs2e.MultiplicationMethod.
Implements the multiplication method of hashing on pages 231-232 of Introduction to Algorithms, Second edition.
MultiplicationMethod(int) - Constructor for class com.mhhe.clrs2e.MultiplicationMethod
Creates a hash function that uses the multiplication method.

N

n - Variable in class com.mhhe.clrs2e.AssemblyLine
The number of stations on each line.
n - Variable in class com.mhhe.clrs2e.BTree.Node
The number of keys stored in the node.
n - Variable in class com.mhhe.clrs2e.FibHeap
How many nodes are in this Fibonacci heap.
n - Variable in class com.mhhe.clrs2e.LongestCommonSubsequence
How many entries are in Y.
n - Variable in class com.mhhe.clrs2e.MatrixChainMultiply
How many matrices are in the chain.
n - Variable in class com.mhhe.clrs2e.OptimalBinarySearchTree
How many keys are in the binary search tree.
name - Variable in class com.mhhe.clrs2e.LongestCommonSubsequence.Direction
The direction indicated.
name - Variable in class com.mhhe.clrs2e.Vertex
This vertex's name.
NegativeIntegerException - exception com.mhhe.clrs2e.NegativeIntegerException.
Exception for when a negative integer is passed as a key to a NonNegativeInteger.
NegativeIntegerException() - Constructor for class com.mhhe.clrs2e.NegativeIntegerException
 
netFlow - Variable in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
The net flow f(u,v) for edge (u,v).
newShortestPathInfo() - Method in class com.mhhe.clrs2e.Dijkstra
Returns a new DijkstraInfo object, overriding SingleSourceShortestPaths.newShortestPathInfo().
newShortestPathInfo() - Method in class com.mhhe.clrs2e.SingleSourceShortestPaths
Returns a new ShortestPathInfo object.
next - Variable in class com.mhhe.clrs2e.AdjacencyListGraph.Edge
The next edge in an adjacency list.
next - Variable in class com.mhhe.clrs2e.DisjointSetLinkedList.Node
This node's successor in the list.
next - Variable in class com.mhhe.clrs2e.LinkedList.Node
Next node in the list.
next() - Method in class com.mhhe.clrs2e.AdjacencyListGraph.VertexIterator
Returns the next vertex in the iteration.
next() - Method in class com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
Returns the next edge in the iteration.
next() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph.VertexIterator
Returns the next vertex in the iteration.
next() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph.EdgeIterator
Returns the next edge in the iteration.
next() - Method in class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
Returns the next edge in the iteration.
next() - Method in class com.mhhe.clrs2e.LinearDLL.LinearDLLIterator
Returns the next element in the iteration.
next() - Method in class com.mhhe.clrs2e.LinkedList.ListIterator
Returns the next element in the iteration.
next() - Method in class com.mhhe.clrs2e.SentinelDLL.SentinelDLLIterator
Returns the next element in the iteration.
next() - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph.EdgeIterator
Returns the next edge in the iteration.
nil - Variable in class com.mhhe.clrs2e.BinarySearchTree
Sentinel, replaces NIL in the textbook's code.
nil - Variable in class com.mhhe.clrs2e.SentinelDLL
The sentinel.
NO_DIGITS - Variable in class com.mhhe.clrs2e.RadixSort
Indicates that the number of digits was not set.
NO_MAX - Variable in class com.mhhe.clrs2e.CountingSort
Indicates that no maximum was set.
NO_RADIX - Variable in class com.mhhe.clrs2e.RadixSort
Indicates that no radix was set.
NO_SCC - Static variable in class com.mhhe.clrs2e.SCC.SecondDFS
Value indicating that a vertex is not yet in an SCC.
node - Variable in class com.mhhe.clrs2e.BinomialHeap.Handle
The Node referenced by this Handle.
node - Variable in class com.mhhe.clrs2e.BTree.BTreeHandle
A node in the B-tree.
noNegWeightCycle - Variable in class com.mhhe.clrs2e.Johnson
true if no negative-weight cycles were detected, false if a negative-weight cycle was detected.
noNegWeightCycle - Variable in class com.mhhe.clrs2e.SingleSourceShortestPaths
true if no negative-weight cycles were detected, false if a negative-weight cycle was detected.
NonNegativeInteger - interface com.mhhe.clrs2e.NonNegativeInteger.
Interface for integer-valued elements for counting-based sorting.

O

object - Variable in class com.mhhe.clrs2e.BinomialHeap.Node
The object stored in this node.
object - Variable in class com.mhhe.clrs2e.FibHeap.Node
The object stored in this node.
OpenAddressingHashTable - class com.mhhe.clrs2e.OpenAddressingHashTable.
Abstract base class for hash tables that use open addressing, as described on pages 237-241 of Introduction to Algorithms, Second edition.
OpenAddressingHashTable() - Constructor for class com.mhhe.clrs2e.OpenAddressingHashTable
Creates a new open-addressed hash table with 16 entries.
OpenAddressingHashTable(int) - Constructor for class com.mhhe.clrs2e.OpenAddressingHashTable
Creates a new open-addressed hash table of a given size.
OptimalBinarySearchTree - class com.mhhe.clrs2e.OptimalBinarySearchTree.
Implements the dynamic-programming algorithm to determine the structure of an optimal binary search tree, as described in Section 15.5 of Introduction to Algorithms, Second edition.
OptimalBinarySearchTree(double[], double[]) - Constructor for class com.mhhe.clrs2e.OptimalBinarySearchTree
Determines the structure of an optimal binary search tree, given an array of probabilities of successful searches for keys and an array of probabilities of unsuccessful searches.
optimalBST(double[], double[], int) - Method in class com.mhhe.clrs2e.OptimalBinarySearchTree
Determines the structure of an optimal binary search tree, given an array of probabilities of successful searches for keys and an array of probabilities of unsuccessful searches.
OrderStatistics - interface com.mhhe.clrs2e.OrderStatistics.
Interface for a select method that finds the ith order statistic in an array of Comparable objects.
OrderStatisticTree - class com.mhhe.clrs2e.OrderStatisticTree.
Implements an order-statistic tree as described in Section 14.1 of Introduction to Algorithms, Second edition.
OrderStatisticTree.Node - class com.mhhe.clrs2e.OrderStatisticTree.Node.
Inner class for an order-statistic tree node, extending a red-black tree node with an additional size field.
OrderStatisticTree.Node(Comparable) - Constructor for class com.mhhe.clrs2e.OrderStatisticTree.Node
Initializes a new node in an order-statistic tree.
OrderStatisticTree.SizeException - exception com.mhhe.clrs2e.OrderStatisticTree.SizeException.
Exception thrown by OrderStatisticTree.actualSize() if the size of the subtree does not agree with the size field of the subtree's root node.
OrderStatisticTree.SizeException(String) - Constructor for class com.mhhe.clrs2e.OrderStatisticTree.SizeException
Creates a SizeException.
OrderStatisticTree() - Constructor for class com.mhhe.clrs2e.OrderStatisticTree
Creates an order-statistic tree with just a nil, which is the root.
overlaps(Interval) - Method in class com.mhhe.clrs2e.Interval
Returns whether this interval overlaps another interval.

P

p - Variable in class com.mhhe.clrs2e.BinomialHeap.Node
This node's parent, or null if this node is a root.
p - Variable in class com.mhhe.clrs2e.DisjointSetForest.Node
Reference to this node's parent.
p - Variable in class com.mhhe.clrs2e.FibHeap.Node
This node's parent, or null if this node is a root.
parent - Variable in class com.mhhe.clrs2e.BinarySearchTree.Node
The node's parent.
parent(int) - Static method in class com.mhhe.clrs2e.Heap
Returns the index of the parent of a node.
part - Variable in class com.mhhe.clrs2e.DeterministicSelect
For partitioning.
part - Variable in class com.mhhe.clrs2e.Quicksort
An object for partitioning; may be either deterministic or randomized.
part - Variable in class com.mhhe.clrs2e.RandomizedSelect
For partitioning.
partition(Comparable[], int, int) - Method in class com.mhhe.clrs2e.Partitioner
Partitions a subarray around its last element.
partition(Comparable[], int, int) - Method in class com.mhhe.clrs2e.RandomizedPartitioner
Partitions a subarray around a randomly chosen element in the subarray.
Partitioner - class com.mhhe.clrs2e.Partitioner.
Class for partitioning an array of Comparable objects.
Partitioner() - Constructor for class com.mhhe.clrs2e.Partitioner
 
pi - Variable in class com.mhhe.clrs2e.BFSInfo
This vertex's parent in the predecessor graph.
pi - Variable in class com.mhhe.clrs2e.DFSInfo
This vertex's parent in the predecessor graph.
pi - Variable in class com.mhhe.clrs2e.Prim.PrimInfo
The current parent for this vertex.
pi - Variable in class com.mhhe.clrs2e.ShortestPathInfo
The current predecessor (parent) for this vertex.
pop() - Method in class com.mhhe.clrs2e.StackArray
Pops an object from the stack, returning the popped object.
pop() - Method in interface com.mhhe.clrs2e.Stack
Pops an object from the stack, returning the popped object.
postorderWalk(BinarySearchTree.Node, BinarySearchTree.Visitor) - Method in class com.mhhe.clrs2e.BinarySearchTree
Performs a postorder walk of the the subtree rooted at a node, applying a Visitor to each node in the subtree.
postorderWalk(BinarySearchTree.Visitor) - Method in class com.mhhe.clrs2e.BinarySearchTree
Traverses the tree in postorder applying a Visitor to each node.
predecessor(Object) - Method in class com.mhhe.clrs2e.BinarySearchTree
Returns the predecessor of a given node in an inorder walk of the tree.
preorderWalk(BinarySearchTree.Node, BinarySearchTree.Visitor) - Method in class com.mhhe.clrs2e.BinarySearchTree
Performs a preorder walk of the the subtree rooted at a node, applying a Visitor to each node in the subtree.
preorderWalk(BinarySearchTree.Visitor) - Method in class com.mhhe.clrs2e.BinarySearchTree
Traverses the tree in preorder applying a Visitor to each node.
prev - Variable in class com.mhhe.clrs2e.LinkedList.Node
Previous node in the list.
Prim - class com.mhhe.clrs2e.Prim.
Implements Prim's algorithm for minimum spanning tree from page 572 of Introduction to Algorithms, Second edition.
Prim.PrimInfo - class com.mhhe.clrs2e.Prim.PrimInfo.
Inner class to maintain the Vertex object, key, parent, and handle into the priority queue for each vertex.
Prim.PrimInfo(Vertex, MinPriorityQueue) - Constructor for class com.mhhe.clrs2e.Prim.PrimInfo
Sets the instance variables so that there is no known edge between this vertex and any vertex in the minimum spanning tree (i.e., the key is infinity), and inserts this object into the min-priority queue.
Prim() - Constructor for class com.mhhe.clrs2e.Prim
 
printLCS(int, int) - Method in class com.mhhe.clrs2e.LongestCommonSubsequence
Returns an LCS of prefixes Xi and Yj.
printMatrix(boolean[][]) - Static method in class com.mhhe.clrs2e.AllPairsShortestPaths
Prints out a 2-dimensional array of boolean as 0s and 1s.
printMatrix(double[][]) - Static method in class com.mhhe.clrs2e.AllPairsShortestPaths
Prints out a 2-dimensional array of double.
printOptimalParens(int, int) - Method in class com.mhhe.clrs2e.MatrixChainMultiply
Returns a String describing an optimal parenthesization of a subproblem.
printSet(Object) - Method in class com.mhhe.clrs2e.DisjointSetLinkedList
Returns the String representation of the set containing a given object.
push(Object) - Method in class com.mhhe.clrs2e.StackArray
Pushes an object onto the stack.
push(Object) - Method in interface com.mhhe.clrs2e.Stack
Pushes an object onto the stack.

Q

QuadraticProbingHashTable - class com.mhhe.clrs2e.QuadraticProbingHashTable.
Implements a hash table with quadratic probing as described on pages 239-240 of Introduction to Algorithms, Second edition.
QuadraticProbingHashTable() - Constructor for class com.mhhe.clrs2e.QuadraticProbingHashTable
Creates a new open-addressed hash table with quadratic probing with 16 entries.
QuadraticProbingHashTable(int, double, double) - Constructor for class com.mhhe.clrs2e.QuadraticProbingHashTable
Creates a new open-addressed hash table with quadratic probing of a given size.
queue - Variable in class com.mhhe.clrs2e.QueueArray
The array implementing the queue.
Queue - interface com.mhhe.clrs2e.Queue.
Interface for a queue.
QueueArray - class com.mhhe.clrs2e.QueueArray.
Implements a queue from page 203 of Introduction to Algorithms, Second edition.
QueueArray() - Constructor for class com.mhhe.clrs2e.QueueArray
Creates an empty queue with 100 slots.
QueueArray(int) - Constructor for class com.mhhe.clrs2e.QueueArray
Creates an empty queue with a given number of slots.
QueueList - class com.mhhe.clrs2e.QueueList.
Defines a queue based on a SentinelDLL.
QueueList() - Constructor for class com.mhhe.clrs2e.QueueList
Makes an empty queue.
Quicksort - class com.mhhe.clrs2e.Quicksort.
Implements the Sorter interface via quicksort from page 146 of Introduction to Algorithms, Second edition.
Quicksort() - Constructor for class com.mhhe.clrs2e.Quicksort
 
quicksort(Comparable[], int, int) - Method in class com.mhhe.clrs2e.Quicksort
Recursive quicksort procedure to sort the subarray array[p..r].

R

radix - Variable in class com.mhhe.clrs2e.RadixSort
The radix being used.
RadixSort - class com.mhhe.clrs2e.RadixSort.
Sorts an array of NonNegativeInteger via the radix sort algorithm from page 172 of Introduction to Algorithms, Second edition.
RadixSort.RadixKeyExtractor - class com.mhhe.clrs2e.RadixSort.RadixKeyExtractor.
Interface that allows us to pull out the sort key from an object.
RadixSort.RadixKeyExtractor(int, int) - Constructor for class com.mhhe.clrs2e.RadixSort.RadixKeyExtractor
Initializes the radix and divisor.
RadixSort() - Constructor for class com.mhhe.clrs2e.RadixSort
Initializes the instance variables to default nonsense values.
RadixSort(int) - Constructor for class com.mhhe.clrs2e.RadixSort
Initializes the radix instance variables to its argument and and digits to a default value.
RadixSort(int, int) - Constructor for class com.mhhe.clrs2e.RadixSort
Initializes the instance variables to its arguments.
radixSort(NonNegativeInteger[], int) - Method in class com.mhhe.clrs2e.RadixSort
Implements radix sort, calculating the number of digits to sort.
radixSort(NonNegativeInteger[], int, int) - Method in class com.mhhe.clrs2e.RadixSort
Implements radix sort.
RandomizedPartitioner - class com.mhhe.clrs2e.RandomizedPartitioner.
Class for doing random partitioning on an array of Comparable objects.
RandomizedPartitioner() - Constructor for class com.mhhe.clrs2e.RandomizedPartitioner
Makes a new generator.
RandomizedPartitioner(Random) - Constructor for class com.mhhe.clrs2e.RandomizedPartitioner
Saves the generator it is given into the instance variable.
RandomizedQuicksort - class com.mhhe.clrs2e.RandomizedQuicksort.
Implements the Sorter interface via randomized quicksort from page 154 of Introduction to Algorithms, Second edition.
RandomizedQuicksort() - Constructor for class com.mhhe.clrs2e.RandomizedQuicksort
 
RandomizedSelect - class com.mhhe.clrs2e.RandomizedSelect.
Implements the OrderStatistics interface via the Randomized-Select procedure (which runs in linear expected time) from page 186 of Introduction to Algorithms, Second edition.
RandomizedSelect() - Constructor for class com.mhhe.clrs2e.RandomizedSelect
Sets the partitioner to be a randomized one.
randomizedSelect(Comparable[], int, int, int) - Method in class com.mhhe.clrs2e.RandomizedSelect
Returns the ith smallest element in a subarray array[p..r].
rank - Variable in class com.mhhe.clrs2e.DisjointSetForest.Node
This node's rank.
rank(Object) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Determines, for a given node, in which ordinal position the node would appear in an inorder walk of the tree.
RecursiveActivitySelector - class com.mhhe.clrs2e.RecursiveActivitySelector.
Implements the Recursive-Activity-Selector algorithm from page 376 of Introduction to Algorithms, Second edition.
RecursiveActivitySelector() - Constructor for class com.mhhe.clrs2e.RecursiveActivitySelector
 
recursiveActivitySelector(Activity[], int, int) - Method in class com.mhhe.clrs2e.RecursiveActivitySelector
Determines a maximum set of mutually compatible activities in a subset of the set of activities.
RED - Static variable in class com.mhhe.clrs2e.RedBlackTree
Color for a red node.
RedBlackTree - class com.mhhe.clrs2e.RedBlackTree.
Implements the Dictionary interface as a red-black tree from Chapter 13 of Introduction to Algorithms, Second edition.
RedBlackTree.BlackHeightException - exception com.mhhe.clrs2e.RedBlackTree.BlackHeightException.
Exception thrown by RedBlackTree.blackHeight(com.mhhe.clrs2e.RedBlackTree.Node) if the black-height of a node is ill-defined.
RedBlackTree.BlackHeightException() - Constructor for class com.mhhe.clrs2e.RedBlackTree.BlackHeightException
 
RedBlackTree.Node - class com.mhhe.clrs2e.RedBlackTree.Node.
Inner class for a red-black tree node.
RedBlackTree.Node(Comparable) - Constructor for class com.mhhe.clrs2e.RedBlackTree.Node
Initializes a node with the data, makes other pointers nil, and makes the node red.
RedBlackTree() - Constructor for class com.mhhe.clrs2e.RedBlackTree
Creates a red-black tree with just a nil, which is the root.
relax(Vertex, double, double) - Method in class com.mhhe.clrs2e.ShortestPathInfo
Relaxes an edge entering this vertex, say v, based on the Relax procedure on page 586 of Introduction to Algorithms, Second edition.
remove() - Method in class com.mhhe.clrs2e.AdjacencyListGraph.VertexIterator
Unsupported.
remove() - Method in class com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
Unsupported.
remove() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph.VertexIterator
Unsupported.
remove() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph.EdgeIterator
Unsupported.
remove() - Method in class com.mhhe.clrs2e.LinearDLL.LinearDLLIterator
Removes the last element returned by the iterator.
remove() - Method in class com.mhhe.clrs2e.LinkedList.ListIterator
Removes the last element returned by the iterator.
remove() - Method in class com.mhhe.clrs2e.SentinelDLL.SentinelDLLIterator
Removes the last element returned by the iterator.
removeFromRootList(BinomialHeap.Node, BinomialHeap.Node) - Method in class com.mhhe.clrs2e.BinomialHeap
Helper method to remove a node from the root list.
representative - Variable in class com.mhhe.clrs2e.DisjointSetLinkedList.Node
The set containing this node.
residualCapacity - Variable in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
The residual capacity cHat(u,v) = c(u,v) - f(u,v) for edge (u,v).
residualOnly - Variable in class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
true if this iterator is to return only edges in the residual network, false if it is to return all edges (even those whose residual capacity is not positive.
reverseEdge - Variable in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
A reference to the reverse edge (v,u) for edge (u,v).
right - Variable in class com.mhhe.clrs2e.BinarySearchTree.Node
The node's right child.
right - Variable in class com.mhhe.clrs2e.FibHeap.Node
This node's right sibling.
right - Variable in class com.mhhe.clrs2e.Huffman.InternalNode
This node's right child.
right(int) - Static method in class com.mhhe.clrs2e.Heap
Returns the index of the right child of a node.
rightRotate(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.IntervalTree
Calls RedBlackTree's RedBlackTree.rightRotate(com.mhhe.clrs2e.RedBlackTree.Node) and then fixes the max fields.
rightRotate(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Calls RedBlackTree's RedBlackTree.rightRotate(com.mhhe.clrs2e.RedBlackTree.Node) and then fixes the size fields.
rightRotate(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.RedBlackTree
Performs a right rotation on a node, making the node's left child its parent.
root - Variable in class com.mhhe.clrs2e.BinarySearchTree
Root of the binary search tree.
root - Variable in class com.mhhe.clrs2e.BTree
The root of the B-tree.
root - Variable in class com.mhhe.clrs2e.Huffman
The root of the Huffman tree.
root - Variable in class com.mhhe.clrs2e.OptimalBinarySearchTree
The root of an optimal binary search tree for subproblem.

S

s - Variable in class com.mhhe.clrs2e.Activity
Start time.
s - Variable in class com.mhhe.clrs2e.MatrixChainMultiply
The position to split an optimal solution to a subproblem.
sameComponent(Vertex, Vertex) - Method in class com.mhhe.clrs2e.ConnectedComponents
Returns a boolean value indicating whether two vertices are in the same connected component.
SCC - class com.mhhe.clrs2e.SCC.
Class to perform the Strongly-Connected-Components procedure on page 554 of Introduction to Algorithms, Second edition.
SCC.FirstDFS - class com.mhhe.clrs2e.SCC.FirstDFS.
Inner class to do the first DFS.
SCC.FirstDFS() - Constructor for class com.mhhe.clrs2e.SCC.FirstDFS
 
SCC.SecondDFS - class com.mhhe.clrs2e.SCC.SecondDFS.
Inner class to do the second DFS.
SCC.SecondDFS() - Constructor for class com.mhhe.clrs2e.SCC.SecondDFS
Initializes currentSCC and all SCC numbers to NO_SCC.
SCC() - Constructor for class com.mhhe.clrs2e.SCC
 
sccNumber - Variable in class com.mhhe.clrs2e.SCC
The SCC number of each vertex.
search(AdjacencyListGraph) - Method in class com.mhhe.clrs2e.DFS
Performs a depth-first search on a graph from a given source vertex, filling in discovery times, finish times, and parents in the predecessor graph in the dfsInfo array.
search(AdjacencyListGraph) - Method in class com.mhhe.clrs2e.SCC.SecondDFS
Performs the main loop of the second DFS.
search(AdjacencyListGraph, Vertex) - Method in class com.mhhe.clrs2e.BFS
Performs a breadth-first search on a graph from a given source vertex, filling in distances and parents in the predecessor graph in the bfsInfo array.
search(BinarySearchTree.Node, Comparable) - Method in class com.mhhe.clrs2e.BinarySearchTree
Searches the subtree rooted at a given node for a node with a given key.
search(Comparable) - Method in class com.mhhe.clrs2e.BinarySearchTree
Searches the tree for a node with a given key.
search(Comparable) - Method in class com.mhhe.clrs2e.BTree
Searches for an element with a given key.
search(Comparable) - Method in class com.mhhe.clrs2e.ChainedHashTable
Searches a chained hash table for an element with a given key.
search(Comparable) - Method in interface com.mhhe.clrs2e.Dictionary
Searches for an element with a given key.
search(Comparable) - Method in class com.mhhe.clrs2e.DirectAddressTable
Searches for an element with a given key in a direct-address table.
search(Comparable) - Method in class com.mhhe.clrs2e.IntervalTree
Finds an interval that overlaps with a given interval.
search(Comparable) - Method in class com.mhhe.clrs2e.LinearDLLDictionary
Searches for an element with a given key.
search(Comparable) - Method in class com.mhhe.clrs2e.OpenAddressingHashTable
Searches for an element with a given key.
search(Comparable) - Method in class com.mhhe.clrs2e.SentinelDLLDictionary
Searches for an element with a given key.
select(BinarySearchTree.Node, int) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Finds the node in a subtree that is at a given ordinal position in an inorder walk of the subtree.
select(Comparable[], int) - Method in class com.mhhe.clrs2e.DeterministicSelect
Returns the ith smallest element in an array.
select(Comparable[], int) - Method in interface com.mhhe.clrs2e.OrderStatistics
Returns the ith smallest element in an array.
select(Comparable[], int) - Method in class com.mhhe.clrs2e.RandomizedSelect
Returns the ith smallest element in an array.
select(Comparable[], int, int, int) - Method in class com.mhhe.clrs2e.DeterministicSelect
Returns the ith smallest element in a subarray array[p..r].
select(int) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Finds the node in the tree that is at a given ordinal position in an inorder walk of the tree.
selected - Variable in class com.mhhe.clrs2e.RecursiveActivitySelector
How many activities have been selected.
selector(Activity[]) - Method in interface com.mhhe.clrs2e.ActivitySelector
Determines a maximum set of mutually compatible activities.
selector(Activity[]) - Method in class com.mhhe.clrs2e.GreedyActivitySelector
Determines a maximum set of mutually compatible activities.
selector(Activity[]) - Method in class com.mhhe.clrs2e.RecursiveActivitySelector
Determines a maximum set of mutually compatible activities.
SentinelDLL - class com.mhhe.clrs2e.SentinelDLL.
A circular, doubly linked list with a sentinel from pages 206-207 of Introduction to Algorithms, Second edition.
SentinelDLL.SentinelDLLIterator - class com.mhhe.clrs2e.SentinelDLL.SentinelDLLIterator.
Inner class for an iterator.
SentinelDLL.SentinelDLLIterator() - Constructor for class com.mhhe.clrs2e.SentinelDLL.SentinelDLLIterator
Starts an iteration.
SentinelDLL() - Constructor for class com.mhhe.clrs2e.SentinelDLL
Makes an empty list, consisting of only the sentinel.
SentinelDLLDictionary - class com.mhhe.clrs2e.SentinelDLLDictionary.
A circular, doubly linked list with a sentinel with a search method.
SentinelDLLDictionary() - Constructor for class com.mhhe.clrs2e.SentinelDLLDictionary
 
setColor(Color) - Method in class com.mhhe.clrs2e.BFSInfo
Sets the vertex's color.
setColor(Color) - Method in class com.mhhe.clrs2e.DFSInfo
Sets the vertex's color
setDiscoveryTime(int) - Method in class com.mhhe.clrs2e.DFSInfo
Sets the vertex's discovery time.
setDistance(int) - Method in class com.mhhe.clrs2e.BFSInfo
Sets the vertex's distance.
setEdge(Object) - Method in class com.mhhe.clrs2e.EdmondsKarp.EKInfo
Sets the edge entering the vertex.
setEstimate(double) - Method in class com.mhhe.clrs2e.ShortestPathInfo
Sets the shortest-path estimate.
setExtractor(CountingSort.KeyExtractor) - Method in class com.mhhe.clrs2e.CountingSort
Changes the extractor to its argument.
setFinishTime(int) - Method in class com.mhhe.clrs2e.DFSInfo
Sets the vertex's finish time.
setIndex(int) - Method in class com.mhhe.clrs2e.Vertex
Sets this vertex's index.
setKey(Comparable) - Method in class com.mhhe.clrs2e.Dijkstra.DijkstraInfo
Sets the key.
setKey(Comparable) - Method in interface com.mhhe.clrs2e.DynamicSetElement
Sets the key of an element.
setKey(Comparable) - Method in class com.mhhe.clrs2e.Huffman.Node
Cannot set the key.
setKey(Comparable) - Method in class com.mhhe.clrs2e.Prim.PrimInfo
Sets the key.
setKey(int) - Method in interface com.mhhe.clrs2e.NonNegativeInteger
 
setMax(int) - Method in class com.mhhe.clrs2e.CountingSort
Changes the maximum to its argument.
setName(String) - Method in class com.mhhe.clrs2e.Vertex
Sets this vertex's name.
setNil(BinarySearchTree.Node) - Method in class com.mhhe.clrs2e.BinarySearchTree
Sets the sentinel nil to a given node.
setNil(OrderStatisticTree.Node) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Set the sentinel nil to a given node.
setNil(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.RedBlackTree
Set the sentinel nil to a given node, and make the sentinel black.
setPredecessor(Vertex) - Method in class com.mhhe.clrs2e.BFSInfo
Sets the vertex's parent in the predecessor graph.
setPredecessor(Vertex) - Method in class com.mhhe.clrs2e.DFSInfo
Sets the vertex's parent in the predecessor graph.
setPredecessor(Vertex) - Method in class com.mhhe.clrs2e.ShortestPathInfo
Sets the predecessor.
setReverseEdge(FlowNetwork.FlowNetworkEdge) - Method in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
Sets the reference to the reverse edge.
sets - Variable in class com.mhhe.clrs2e.ConnectedComponents
A disjoint-set union structure for components.
setWeight(double) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph.WeightedEdge
Sets the weight of this edge.
setWeight(double) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph.EdgeIterator
Sets the weight of the edge returned by the most recent call to next.
setWeight(double) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph.EdgeIterator
Sets the weight of the edge returned by the most recent call to next.
setWeight(double) - Method in interface com.mhhe.clrs2e.WeightedEdgeIterator
Sets the weight of the edge returned by the most recent call to next.
shiftAmount - Variable in class com.mhhe.clrs2e.MultiplicationMethod
If the table size is a power of 2, the shift amount used.
ShortestPathInfo - class com.mhhe.clrs2e.ShortestPathInfo.
Class for information determined about a vertex during a shortest-path algorithm.
ShortestPathInfo() - Constructor for class com.mhhe.clrs2e.ShortestPathInfo
Initializes the shortest-path estimate to infinity and the predecessor to null.
sibling - Variable in class com.mhhe.clrs2e.BinomialHeap.Node
This node's right sibling, or null if this node has no right sibling.
SingleSourceShortestPaths - class com.mhhe.clrs2e.SingleSourceShortestPaths.
Abstract class for computing single-source shortest paths.
SingleSourceShortestPaths(WeightedAdjacencyListGraph) - Constructor for class com.mhhe.clrs2e.SingleSourceShortestPaths
Sets up the instance variables, including allocation of the spInfo array but not allocation of the ShortestPathInfo objects referenced by the array.
size - Variable in class com.mhhe.clrs2e.DisjointSetLinkedList.DisjointSet
How many elements are in this set.
size - Variable in class com.mhhe.clrs2e.OrderStatisticTree.Node
Number of nodes in the subtree rooted at this node.
SlowAllPairsShortestPaths - class com.mhhe.clrs2e.SlowAllPairsShortestPaths.
Implements the Slow-All-Pairs-Shortest-Paths procedure on page 625 of Introduction to Algorithms, Second edition.
SlowAllPairsShortestPaths() - Constructor for class com.mhhe.clrs2e.SlowAllPairsShortestPaths
 
sort() - Method in class com.mhhe.clrs2e.SortableSentinelDLL
Runs insertion sort on a circular, doubly linked list with a sentinel.
sort(Comparable[]) - Method in class com.mhhe.clrs2e.Heap.Heapsort
Sorts an array of Comparable objects.
sort(Comparable[]) - Method in class com.mhhe.clrs2e.Heapsort
Sorts an array of Comparable objects.
sort(Comparable[]) - Method in class com.mhhe.clrs2e.InsertionSort
Sorts an array of Comparable objects.
sort(Comparable[]) - Method in class com.mhhe.clrs2e.MergeSort
Sorts an array of Comparable objects.
sort(Comparable[]) - Method in class com.mhhe.clrs2e.Quicksort
Sorts an array of Comparable objects.
sort(Comparable[]) - Method in class com.mhhe.clrs2e.RandomizedQuicksort
Sorts an array of Comparable objects.
sort(Comparable[]) - Method in interface com.mhhe.clrs2e.Sorter
Sorts an array of Comparable objects.
sort(DoubleValued[]) - Method in class com.mhhe.clrs2e.BucketSort
Sorts an array of DoubleValued.
sort(NonNegativeInteger[]) - Method in class com.mhhe.clrs2e.CountingSort
Sorts an array of NonNegativeInteger.
sort(NonNegativeInteger[]) - Method in class com.mhhe.clrs2e.RadixSort
Sorts an array of NonNegativeInteger.
SortableSentinelDLL - class com.mhhe.clrs2e.SortableSentinelDLL.
Circular, doubly linked list with a sentinel, that also has a sort method.
SortableSentinelDLL() - Constructor for class com.mhhe.clrs2e.SortableSentinelDLL
 
Sorter - interface com.mhhe.clrs2e.Sorter.
Interface for a sorting algorithm.
spInfo - Variable in class com.mhhe.clrs2e.Johnson
The result of running a Johnson's algorithm.
spInfo - Variable in class com.mhhe.clrs2e.SingleSourceShortestPaths
The result of running a single-source shortest-paths algorithm.
spliceIn(FibHeap.Node, FibHeap.Node) - Method in class com.mhhe.clrs2e.FibHeap
Splices the node list containing one node into the node list containing another node, just to the left of it.
stack - Variable in class com.mhhe.clrs2e.StackArray
The array implementing the stack.
Stack - interface com.mhhe.clrs2e.Stack.
Interface for a stack.
StackArray - class com.mhhe.clrs2e.StackArray.
Implements an elementary stack from page 201 of Introduction to Algorithms, Second edition.
StackArray() - Constructor for class com.mhhe.clrs2e.StackArray
Makes an empty stack with 1 slot.
StackArray(int) - Constructor for class com.mhhe.clrs2e.StackArray
Makes an empty stack with a given number of slots.
StackUnderflowException - exception com.mhhe.clrs2e.StackUnderflowException.
Exception thrown in case of trying to pop an empty stack.
StackUnderflowException() - Constructor for class com.mhhe.clrs2e.StackUnderflowException
 
stronglyConnectedComponents(AdjacencyListGraph) - Method in class com.mhhe.clrs2e.SCC
Computes the strongly connected components of a directed graph, filling in SCC numbers in the sccNumber array so that sccNumber[i] is the SCC number of the vertex whose index is i.
successor(Object) - Method in class com.mhhe.clrs2e.BinarySearchTree
Returns the successor of a given node in an inorder walk of the tree.
system - Variable in class com.mhhe.clrs2e.DifferenceConstraints
A list of the difference constraints.

T

t - Variable in class com.mhhe.clrs2e.BTree
The minimum degree, i.e., the minimum number of keys in any node other than the root.
table - Variable in class com.mhhe.clrs2e.ChainedHashTable
The hash table is an array of linked lists.
table - Variable in class com.mhhe.clrs2e.DirectAddressTable
The direct-address table.
table - Variable in class com.mhhe.clrs2e.OpenAddressingHashTable
The hash table.
tableSize - Variable in class com.mhhe.clrs2e.MultiplicationMethod
The size of the hash table being used.
tail - Variable in class com.mhhe.clrs2e.DisjointSetLinkedList.DisjointSet
The tail of the list.
tail - Variable in class com.mhhe.clrs2e.QueueArray
The index at which the next object will be added.
theObject - Variable in class com.mhhe.clrs2e.DisjointSetForest.Node
Reference to the object.
theObject - Variable in class com.mhhe.clrs2e.DisjointSetLinkedList.Node
Reference to the object.
theVertex - Variable in class com.mhhe.clrs2e.Dijkstra.DijkstraInfo
The vertex.
theVertex - Variable in class com.mhhe.clrs2e.Prim.PrimInfo
The vertex.
thisVertex - Variable in class com.mhhe.clrs2e.AdjacencyListGraph.AdjListInfo
The vertex whose adjacency list this is.
time - Variable in class com.mhhe.clrs2e.DFS
The global timestamp.
toArray(Object[]) - Method in class com.mhhe.clrs2e.LinkedList
Copies each element of this list into an array.
top - Variable in class com.mhhe.clrs2e.StackArray
The index of the top of the stack.
topologicalSort(AdjacencyListGraph) - Method in class com.mhhe.clrs2e.TopoSort
Performs a topological sort on a graph.
TopoSort - class com.mhhe.clrs2e.TopoSort.
Class that topologically sorts a DAG.
TopoSort.TopoSortDFS - class com.mhhe.clrs2e.TopoSort.TopoSortDFS.
Inner class to do DFS but with inserting finished vertices onto the front of the linked list.
TopoSort.TopoSortDFS() - Constructor for class com.mhhe.clrs2e.TopoSort.TopoSortDFS
 
TopoSort() - Constructor for class com.mhhe.clrs2e.TopoSort
 
toString() - Method in class com.mhhe.clrs2e.Activity
Returns the String representation of this activity, using half-open interval notation.
toString() - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Returns the String representation of this graph.
toString() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns the String representation of this graph.
toString() - Method in class com.mhhe.clrs2e.AssemblyLine
Returns the String representation of a fastest way through the factory.
toString() - Method in class com.mhhe.clrs2e.BFSInfo
Returns the String representation of this object.
toString() - Method in class com.mhhe.clrs2e.BinarySearchTree
Returns a multiline String representation of the tree, representing the depth of each node by two spaces per depth preceding the String representation of the node.
toString() - Method in class com.mhhe.clrs2e.BinarySearchTree.Node
Returns the data instance variable of this node as a String.
toString() - Method in class com.mhhe.clrs2e.BinomialHeap
Returns the String representation of this binomial heap, based on the objects in the nodes.
toString() - Method in class com.mhhe.clrs2e.BinomialHeap.Node
Returns the String representation of this node's object.
toString() - Method in class com.mhhe.clrs2e.BTree
Returns the String representation of this B-tree by walking it.
toString() - Method in class com.mhhe.clrs2e.DFSInfo
Returns the String representation of this object.
toString() - Method in class com.mhhe.clrs2e.DifferenceConstraints
Returns the String representation of this system of difference constraints.
toString() - Method in class com.mhhe.clrs2e.DifferenceConstraints.Constraint
Returns the String representation of this difference constraint.
toString() - Method in class com.mhhe.clrs2e.DisjointSetForest.Node
Returns the String representation of this node.
toString() - Method in class com.mhhe.clrs2e.DisjointSetLinkedList.Node
Returns the String representation of this node.
toString() - Method in class com.mhhe.clrs2e.DisjointSetLinkedList.DisjointSet
Returns the String representation of this set, with each element appearing on a separate line.
toString() - Method in class com.mhhe.clrs2e.FibHeap
Returns the String representation of this Fibonacci heap, based on the objects in the nodes.
toString() - Method in class com.mhhe.clrs2e.FibHeap.Node
Returns the String representation of this node's object, along with its degree and mark.
toString() - Method in class com.mhhe.clrs2e.FlowNetwork
Returns the String representation of this flow network.
toString() - Method in class com.mhhe.clrs2e.Interval
Returns the String representation of this interval in the form [low, high].
toString() - Method in class com.mhhe.clrs2e.IntervalTree.Node
Returns the String representation of this node.
toString() - Method in class com.mhhe.clrs2e.Kruskal.WeightedEdge
Returns the String representation of this object.
toString() - Method in class com.mhhe.clrs2e.LinkedList
Returns the String representation of this list.
toString() - Method in class com.mhhe.clrs2e.LongestCommonSubsequence
Returns an LCS of X and Y as a String.
toString() - Method in class com.mhhe.clrs2e.LongestCommonSubsequence.Direction
Returns the String representation of this Direction.
toString() - Method in class com.mhhe.clrs2e.MatrixChainMultiply
Returns a String describing an optimal parenthesization of the entire matrix chain.
toString() - Method in class com.mhhe.clrs2e.OpenAddressingHashTable
Returns the String representation of this hash table, with one entry per line.
toString() - Method in class com.mhhe.clrs2e.OrderStatisticTree.Node
Returns a string representation of this node's data and size.
toString() - Method in class com.mhhe.clrs2e.QueueList
Returns the String representation of this queue.
toString() - Method in class com.mhhe.clrs2e.RedBlackTree.Node
Returns the data instance variable of this node and this node's color as a String.
toString() - Method in class com.mhhe.clrs2e.ShortestPathInfo
Returns the String representation of this object.
toString() - Method in class com.mhhe.clrs2e.Vertex
Returns the String representation of this vertex.
toString() - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Returns the String representation of this weighted graph.
toString() - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Returns the String representation of this graph.
toString(int) - Method in class com.mhhe.clrs2e.BinarySearchTree.Node
Returns a multiline String representation of the subtree rooted at this node, representing the depth of each node by two spaces per depth preceding the String representation of the node.
transpose(AdjacencyListGraph) - Method in class com.mhhe.clrs2e.SCC
Transposes a graph.
treeInsert(BinarySearchTree.Node) - Method in class com.mhhe.clrs2e.BinarySearchTree
Inserts a node into the tree.
treeInsert(IntervalTree.Node) - Method in class com.mhhe.clrs2e.IntervalTree
Inserts a node, updating the max fields of its ancestors before the superclass's insertNode is called.
treeInsert(OrderStatisticTree.Node) - Method in class com.mhhe.clrs2e.OrderStatisticTree
Inserts a node, updating the size fields of its ancestors before the superclass's insertNode is called.
treeInsert(RedBlackTree.Node) - Method in class com.mhhe.clrs2e.RedBlackTree
Inserts a node into the tree.
treeMaximum(BinarySearchTree.Node) - Method in class com.mhhe.clrs2e.BinarySearchTree
Returns the node with the maximum key in the subtree rooted at a node.
treeMinimum(BinarySearchTree.Node) - Method in class com.mhhe.clrs2e.BinarySearchTree
Returns the node with the minimum key in the subtree rooted at a node.

U

u - Variable in class com.mhhe.clrs2e.AdjacencyMatrixGraph.EdgeIterator
The index of the vertex whose edges this iterator iterates through.
u - Variable in class com.mhhe.clrs2e.Kruskal.WeightedEdge
A vertex on which this edge is incident.
union(MergeableHeap) - Method in class com.mhhe.clrs2e.BinomialHeap
Creates a new binomial heap that contains all the elements of two binomial heaps.
union(MergeableHeap) - Method in class com.mhhe.clrs2e.FibHeap
Creates a new Fibonacci heap that contains all the elements of two Fibonacci heaps.
union(MergeableHeap) - Method in class com.mhhe.clrs2e.MergeableHeap
Creates a new mergeable heap that contains all the elements of two mergeable heaps.
union(MergeableHeap, MergeableHeap) - Static method in class com.mhhe.clrs2e.MergeableHeap
Creates a new mergeable heap that contains all the elements of two mergeable heaps.
union(Object, Object) - Method in class com.mhhe.clrs2e.DisjointSetForest
Unites two sets, identified by handles to objects in the sets.
union(Object, Object) - Method in class com.mhhe.clrs2e.DisjointSetLinkedList
Unites two sets, identified by handles to objects in the sets.
union(Object, Object) - Method in interface com.mhhe.clrs2e.DisjointSetUnion
Unites two sets, identified by handles to objects in the sets.
UNKNOWN_INDEX - Static variable in class com.mhhe.clrs2e.Vertex
Value that indicates that this vertex does not yet have an index, i.e., the index is unknown.
UP - Static variable in class com.mhhe.clrs2e.LongestCommonSubsequence
 
UP_AND_LEFT - Static variable in class com.mhhe.clrs2e.LongestCommonSubsequence
 
updateForDecreaseKey(FibHeap.Node, boolean) - Method in class com.mhhe.clrs2e.FibHeap
Changes the structure of the Fibonacci heap as part of a decreaseKey operation.
useSameVertices() - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Creates and returns a graph that uses the same set of vertices as this graph.

V

v - Variable in class com.mhhe.clrs2e.Kruskal.WeightedEdge
Another vertex on which this edge is incident.
vertex - Variable in class com.mhhe.clrs2e.AdjacencyListGraph.Edge
An adjacent vertex.
Vertex - class com.mhhe.clrs2e.Vertex.
A class for vertices in graphs.
Vertex(int, String) - Constructor for class com.mhhe.clrs2e.Vertex
Creates a vertex with a given index and name.
Vertex(String) - Constructor for class com.mhhe.clrs2e.Vertex
Creates a vertex whose index is unknown.
vertexIterator() - Method in class com.mhhe.clrs2e.AdjacencyListGraph
Returns an iterator that iterates though all the vertices in the graph.
vertexIterator() - Method in class com.mhhe.clrs2e.AdjacencyMatrixGraph
Returns an iterator that iterates though all the vertices in the graph.
vertexIterator() - Method in interface com.mhhe.clrs2e.Graph
Returns an iterator that iterates though all the vertices in the graph.
vertices - Variable in class com.mhhe.clrs2e.AdjacencyMatrixGraph
An array of all the vertices in this graph.
visit(Object) - Method in interface com.mhhe.clrs2e.BinarySearchTree.Visitor
Perform some action upon visiting the node.

W

w - Variable in class com.mhhe.clrs2e.Kruskal.WeightedEdge
The weight of the edge.
walk(int) - Method in class com.mhhe.clrs2e.BinomialHeap.Node
Returns the String representation of the subtree rooted at this node, based on the objects in the nodes.
walk(int) - Method in class com.mhhe.clrs2e.BTree.Node
Returns the String representation of the subtree rooted at this node.
walk(int) - Method in class com.mhhe.clrs2e.FibHeap.Node
Returns the String representation of the subtree rooted at this node, based on the objects in the nodes.
weight - Variable in class com.mhhe.clrs2e.WeightedAdjacencyListGraph.WeightedEdge
The weight of this edge.
WeightedAdjacencyListGraph - class com.mhhe.clrs2e.WeightedAdjacencyListGraph.
Implementation of a weighted graph, using adjacency lists.
WeightedAdjacencyListGraph.EdgeIterator - class com.mhhe.clrs2e.WeightedAdjacencyListGraph.EdgeIterator.
Inner class that overrides AdjacencyListGraph.EdgeIterator to implement WeightedEdgeIterator.
WeightedAdjacencyListGraph.EdgeIterator(int) - Constructor for class com.mhhe.clrs2e.WeightedAdjacencyListGraph.EdgeIterator
Starts an iteration through the weighted edges incident on a given vertex.
WeightedAdjacencyListGraph.WeightedEdge - class com.mhhe.clrs2e.WeightedAdjacencyListGraph.WeightedEdge.
Inner class for weighted edges in adjacency lists.
WeightedAdjacencyListGraph.WeightedEdge(Vertex, AdjacencyListGraph.Edge, double) - Constructor for class com.mhhe.clrs2e.WeightedAdjacencyListGraph.WeightedEdge
Creates a new edge.
WeightedAdjacencyListGraph(int, boolean) - Constructor for class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Creates an empty WeightedAdjacencyListGraph.
WeightedAdjacencyMatrixGraph - class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph.
Implementation of a weighted graph, using an adjacency matrix.
WeightedAdjacencyMatrixGraph.EdgeIterator - class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph.EdgeIterator.
Inner class that overrides AdjacencyListGraph.EdgeIterator to implement WeightedEdgeIterator.
WeightedAdjacencyMatrixGraph.EdgeIterator(int) - Constructor for class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph.EdgeIterator
Starts an iteration through the weighted edges incident on a given vertex.
WeightedAdjacencyMatrixGraph(int, boolean, double) - Constructor for class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Creates an empty WeightedAdjacencyMatrixGraph.
WeightedEdgeIterator - interface com.mhhe.clrs2e.WeightedEdgeIterator.
Interface for an iterator that returns weighted edges.
weightedEdgeIterator(int) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Returns an iterator, of type WeightedEdgeIterator (so that the caller does not need to cast the result), that iterates through the weighted edges incident on a given vertex.
weightedEdgeIterator(int) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Returns an iterator, of type WeightedEdgeIterator (so that the caller does not need to cast the result), that iterates through the weighted edges incident on a given vertex.
weightedEdgeIterator(Vertex) - Method in class com.mhhe.clrs2e.WeightedAdjacencyListGraph
Returns an iterator, of type WeightedEdgeIterator (so that the caller does not need to cast the result), that iterates through the weighted edges incident on a given vertex.
weightedEdgeIterator(Vertex) - Method in class com.mhhe.clrs2e.WeightedAdjacencyMatrixGraph
Returns an iterator, of type WeightedEdgeIterator (so that the caller does not need to cast the result), that iterates through the weighted edges incident on a given vertex.

X

x - Variable in class com.mhhe.clrs2e.LongestCommonSubsequence
The input X.

Z

zeroFlow(FlowNetwork) - Method in class com.mhhe.clrs2e.MaxFlow
Initializes the flow in a flow network to 0.
zeroNetFlow() - Method in interface com.mhhe.clrs2e.FlowNetworkEdgeIterator
Zeros out the net flow of the edge returned by the most recent call to next.
zeroNetFlow() - Method in class com.mhhe.clrs2e.FlowNetwork.FlowNetworkEdge
Zeros out the net flow on this edge and its reverse and updates residual capacities on both edges.
zeroNetFlow() - Method in class com.mhhe.clrs2e.FlowNetwork.EdgeIterator
Zeros out the net flow of the edge returned by the most recent call to next.

A B C D E F G H I J K L M N O P Q R S T U V W X Z