A B C D E F G H I L M N O P R S T V

A

address - Variable in class InformationRecord
Street address
address - Variable in class InformationRecord2
Street address
addTreeModelListener(TreeModelListener) - Method in class BinaryTreePlus
This is a TreeModel method we don't care about.
age - Variable in class InformationRecord
Age
age - Variable in class InformationRecord2
Age
arrayList - Static variable in class ListPutFirstTest
Array version of list

B

BasicRecursion - class BasicRecursion.
Class BasicRecursion contains a single method to sum the elements of an array using a recursive algorithm.
BasicRecursion() - Constructor for class BasicRecursion
 
BasicRecursionTest - class BasicRecursionTest.
Class BasicRecursionTest illustrates the use of a very basic recursive function to sum the elements in an array.
BasicRecursionTest() - Constructor for class BasicRecursionTest
 
binarySearch(Object[], Object) - Method in class ListSortAndSearch
Perform an iterative binary search of the given list for the given element.
binarySearchIterative(Object[], Object) - Method in class ListSearch
Perform an interative binary search of the given list for the given element, between the given start and end positions.
binarySearchRecursive(Object[], Object, int, int) - Method in class ListSearch
Perform a recursive binary search of the given list for the given element, between the given start and end positions.
BinarySearchTree - class BinarySearchTree.
Class BinarySearchTree defines a binary search tree data structure with Object-valued nodes.
BinarySearchTree(BinaryTreeNode) - Constructor for class BinarySearchTree
Construct this with the given node as the root.
BinarySearchTreeTest - class BinarySearchTreeTest.
Class BinarySearchTreeTest exercises the BinarySearchTree class.
BinarySearchTreeTest() - Constructor for class BinarySearchTreeTest
 
BinaryTree - class BinaryTree.
Class BinaryTree defines a basic binary tree data structure with Object-valued nodes.
BinaryTree(BinaryTreeNode) - Constructor for class BinaryTree
Construct this with the given node as the root.
BinaryTreeNode - class BinaryTreeNode.
Class BinaryTreeNode defines the structure of a node in a binary tree.
BinaryTreeNode(Object, BinaryTreeNode, BinaryTreeNode) - Constructor for class BinaryTreeNode
Construct a node with the given value and subtree pointers.
BinaryTreePlus - class BinaryTreePlus.
Class BinaryTreePlus is an extended version of the plain BinaryTree class.
BinaryTreePlus(BinaryTreePlusNode) - Constructor for class BinaryTreePlus
Construct this with the given node as the root.
BinaryTreePlusNode - class BinaryTreePlusNode.
Class BinaryTreePlusNode is an extension of the plain BinaryTreeNode class.
BinaryTreePlusNode(Object, BinaryTreePlusNode, BinaryTreePlusNode) - Constructor for class BinaryTreePlusNode
Construct a node with the given value and subtree pointers.
BinaryTreePlusTest - class BinaryTreePlusTest.
Class BinaryTreePlusTest exercises the BinaryTreePlus class.
BinaryTreePlusTest() - Constructor for class BinaryTreePlusTest
 
BinaryTreeTest - class BinaryTreeTest.
Class BinaryTreeTest exercises the BinaryTree class.
BinaryTreeTest() - Constructor for class BinaryTreeTest
 
BooksLinkedList - class BooksLinkedList.
Class BooksLinkedList is an alternate implementation of the LinkedList example given in Section 3.2.3 of the text book.
BooksLinkedList() - Constructor for class BooksLinkedList
Construct a new empty list.
BooksLinkedListTest - class BooksLinkedListTest.
Class BooksLinkedList exercises the BooksLinkedList class.
BooksLinkedListTest() - Constructor for class BooksLinkedListTest
 

C

clear() - Method in class ListAsArray
Clear out all of the elements of this.
clear() - Method in class ListAsLinkedList
Clear out all of the elements of this.

D

DEFAULT_SIZE - Variable in class HashTable
Default table size if zero-argument constructor is used
displayOnlyChildren() - Static method in class BinaryTreePlusTest
 
displayTree(BinaryTreePlus, String) - Static method in class BinaryTreePlusTest
 
doArrayPuts(int) - Static method in class ListPutFirstTest
Call ListAsArray.putFirst n times.
doLinkedPuts(int) - Static method in class ListPutFirstTest
Call ListAsLinkedList.putFirst n times.
dumpMultiLookupResults(HashTable, Integer, int) - Static method in class HashTableTest
Dump the result of what is expected to be a n-value lookup.
dumpSingleLookupResults(HashTable, Integer) - Static method in class HashTableTest
Dump the result of what is expected to be a single-value lookup.

E

emptyStack() - Method in class BinaryTreePlus
 
enter(HashTableEntry) - Method in class HashTable
Enter the given entry into this table if an entry of the same key is not already in the table.
equals(Object) - Method in class InformationRecord2
Define equals as elementwise equality.
expectedType - Variable in class HashEntryTypeInvalid
The type expected by HashTable.enter, based on that type having been given to the constructor of the instance upon which enter was called.

F

find(Object) - Method in class BinarySearchTree
Return a pointer to the node containing the given value, using the O(log N) binary search tree algorithm.
find(Object) - Method in class BinaryTree
Return a pointer to the first node containing the given value, using a preorder traversal.
find(Object) - Method in class BinaryTreePlus
Return a pointer to the first node containing the given value, using a preorder traversal.
find(Object, BinaryTreeNode) - Method in class BinarySearchTree
Recursive work doer for find(Object).
FindLargest - class FindLargest.
Class FindLargest illustrates two methods for finding the largest value in an array.
FindLargest() - Constructor for class FindLargest
 
findLargest(Comparable[]) - Method in class FindLargest
Return the largest element in the given array of comparable objects.
findLargest(int[]) - Method in class FindLargest
Return the largest element in the given array of integers.
FindLargestTest - class FindLargestTest.
Class FindLargestTest illustrates the use of the two methods defined in the companion FindLargest class.
FindLargestTest() - Constructor for class FindLargestTest
 
findPreorder(Object, BinaryTreeNode) - Method in class BinaryTree
Recursive work doer for find.
findPreorder(Object, BinaryTreePlusNode) - Method in class BinaryTreePlus
Recursive work doer for find.
findSmallest(BinaryTreeNode) - Method in class BinarySearchTree
Find the node with smallest value in the given subtree t.

G

generateTime(int) - Static method in class ListSortTimes
Generate a timing pair for list sorting of the form list_size sort_time
getChild(Object, int) - Method in class BinaryTreePlus
If the given index = 0, return the left child of the given parent, otherwise return the right child.
getChildCount(Object) - Method in class BinaryTreePlus
Return 0 if the given parent object is a leaf node, return 2 otherwise.
getIndexOfChild(Object, Object) - Method in class BinaryTreePlus
Return 0 or 1 based on whether the given child is the right or left child of the given parent.
getKey() - Method in interface HashTableEntry
Return the key used to enter, lookup, and delete from a hash table.
getKey() - Method in class HashTableTest.IntEntry
Return the key value of this entry, which is just the single Integer value.
getKey() - Method in class HashTableTestSimple.IntEntry
Return the key value of this entry, which is just the single Integer value.
getKey() - Method in class InformationRecord
Return the id field of this as the key value.
getKey() - Method in class InformationRecord2
Return the id field of this as the key value.
getKey2() - Method in class InformationRecord2
Return the id field of this as the key value.
getRoot() - Method in class BinaryTreePlus
Return the root of this tree.
givenType - Variable in class HashEntryTypeInvalid
The erroneous type sent to enter, i.e., a type not == to the expected type.

H

hash(Object, int) - Method in interface HashTableEntry
Compute the hash index for the given key modulo the given table size.
hash(Object, int) - Method in class HashTableTest.IntEntry
Compute the hash function of this entry as (key + 2) % tableSize.
hash(Object, int) - Method in class HashTableTestSimple.IntEntry
Compute the hash function of this entry as (key + 2) % tableSize.
hash(Object, int) - Method in class InformationRecord
Compute the hash index for this record as the given key modulo the given table size.
hash(Object, int) - Method in class InformationRecord2
Compute the hash index for this record as the given key modulo the given table size.
hash1(String, int) - Static method in class hashing.Hashing
Compute a hash index for the given string by summing the string characters and taking the modulus of the given table size.
hash2(Object, int) - Method in class InformationRecord2
Compute the hash index for this record by summing all of the characters of the given String key with the following formula: (37 * char[0]) + (37^2 * char[1]) + ...
hash2(String, int) - Static method in class hashing.Hashing
Compute a hash index for the given string by summing the first three string characters with the formula: char[0] + (27 * char[1]) + (729 * char[2]) where 27 is the number of letter in the alphabet + 1 for a blank, and 729 is 272.
hash3(String, int) - Static method in class hashing.Hashing
Compute a hash index for the given string by summing all of the string characters with the formula: (37 * char[0]) + (37^2 * char[1]) + ...
HashEntryTypeInvalid - exception HashEntryTypeInvalid.
Class HashEntryTypeInvalid is an exception that is thrown by HashTable.enter if the type of enter's input parameter is different than the type with which the table was constructed.
HashIndexInvalid - exception HashIndexInvalid.
Class HashIndexInvalid is an exception that is thrown by HashTable.enter if the return value of HashTableEntry.hash is out of the table range of 0 to tableSize-1.
HashIndexInvalid(int) - Constructor for class HashIndexInvalid
Initializing constructor.
Hashing - class hashing.Hashing.
Class Hashing contains three different string-valued hash functions, as discussed in Lecture Notes Week 5.
Hashing() - Constructor for class hashing.Hashing
 
HashTable - class HashTable.
Class HashTable is a simple hash table example, as discussed in CSC 103 lecture notes week 5 and week 5, part 2 .
HashTable() - Constructor for class HashTable
Construct an empty table of the default size of 1000 entries.
HashTable(int) - Constructor for class HashTable
Construct an empty table of the given size.
HashTableEntry - interface HashTableEntry.
Interface HashTableEntry defines the getKey and hash methods that an entry in a HashTable must implement.
HashTableFull - exception HashTableFull.
Class HashTableFull is an exception that is thrown by HashTable.enter if there is no available space to make a new entry in the table.
HashTableFull() - Constructor for class HashTableFull
 
HashTableTest - class HashTableTest.
Class HashTableTest exercises the HashTable class using a simple integer-valued hash table entry.
HashTableTest.IntEntry - class HashTableTest.IntEntry.
Inner class IntEntry is a very simple implementation of HashTableEntry with a single Integer field.
HashTableTest.IntEntry(int) - Constructor for class HashTableTest.IntEntry
Construct an entry with the given int value.
HashTableTest() - Constructor for class HashTableTest
 
HashTableTestSimple - class HashTableTestSimple.
Class HashTableTestSimple exercises the HashTable class using a very simple integer-valued hash table entry.
HashTableTestSimple.IntEntry - class HashTableTestSimple.IntEntry.
Inner class IntEntry is a very simple implementation of HashTableEntry with a single Integer field.
HashTableTestSimple.IntEntry(int) - Constructor for class HashTableTestSimple.IntEntry
Construct an entry with the given int value.
HashTableTestSimple() - Constructor for class HashTableTestSimple
 
height - Variable in class BinaryTreePlusNode
Height of subtree rooted at this node

I

id - Variable in class InformationRecord
Unique 9-digit id
id - Variable in class InformationRecord2
Unique 9-digit id
index - Variable in class HashIndexInvalid
The invalid index value
InformationRecord - class InformationRecord.
Class InformationRecord defines a simple record structure used with the HashTable and HashTableTest examples.
InformationRecord(String, int, int, String) - Constructor for class InformationRecord
Construct an InformationRecord with the given field values.
InformationRecord2 - class InformationRecord2.
Class InformationRecord2 defines a simple record structure, suitable for use in testing the LookupTable class of assignment 3.
InformationRecord2(String, int, int, String) - Constructor for class InformationRecord2
Construct an InformationRecord with the given field values.
insert(Object) - Method in class BinarySearchTree
Insert a new node containing the given value in the proper order position.
insert(Object, BinaryTreeNode) - Method in class BinarySearchTree
Recursive work doer for insert(Object).
isEmpty() - Method in class BooksLinkedList
Return true if this is empty, false if not.
isLeaf() - Method in class BinaryTreePlusNode
Return tree if this is a leaf node, i.e., both right and left pointers are null.
isLeaf(Object) - Method in class BinaryTreePlus
Return true if the given node is a leaf, false if not.

L

lastEntry - Variable in class HashTable
Reference to most recent entry, for use by lookup and delete
left - Variable in class BinaryTreeNode
Pointer to the left subtree of this node
left - Variable in class BinaryTreePlusNode
Pointer to the left subtree of this node
linearSearch(Object[], Object) - Method in class ListSortAndSearch
Perform an iterative linear search of the given list for the given element.
linkedList - Static variable in class ListPutFirstTest
Linked version of list
ListAsArray - class ListAsArray.
Class ListAsArray illustrates the O(N) running time for the putFirst method in an array-based implementation of a list.
ListAsArray() - Constructor for class ListAsArray
Allocate a list of the default size of 100000.
ListAsLinkedList - class ListAsLinkedList.
Class ListAsLinkedList illustrates the O(1) running time for the putFirst method in an linked list implementation of a list.
ListAsLinkedList() - Constructor for class ListAsLinkedList
Construct an empty list.
ListAsLinkedListTest - class ListAsLinkedListTest.
Class ListAsLinkedListTest exercises the ListAsLinkedList class.
ListAsLinkedListTest() - Constructor for class ListAsLinkedListTest
 
ListAsLinkedListTest2 - class ListAsLinkedListTest2.
Class ListAsLinkedList exercises the ListAsLinkedList class.
ListAsLinkedListTest2() - Constructor for class ListAsLinkedListTest2
 
ListPutFirstTest - class ListPutFirstTest.
Class ListPutFirstTest runs test cases on the putFirst methods of the ListAsArray and ListAsLinkedList classes.
ListPutFirstTest() - Constructor for class ListPutFirstTest
 
ListSearch - class ListSearch.
Class ListSearch illustrates the recursive and iterative algorithms for binary search on arrays.
ListSearch() - Constructor for class ListSearch
 
ListSearchTest - class ListSearchTest.
Class ListSearchTest illustrates the use of the two methods defined in the companion ListSearch class.
ListSearchTest() - Constructor for class ListSearchTest
 
ListSortAndSearch - class ListSortAndSearch.
Class ListSortAndSearch contains sorting and searching algorithms for array-based lists.
ListSortAndSearch() - Constructor for class ListSortAndSearch
 
ListSortAndSearchTest - class ListSortAndSearchTest.
Class ListSortAndSearchTest does timing tests on the sorting and searching methods defined in the ListSortAndSearch class.
ListSortAndSearchTest() - Constructor for class ListSortAndSearchTest
 
ListSortTimes - class ListSortTimes.
Class ListSortTimes outputs raw data points for worst-case sort of lists between sizes 100 and 5000, in increments of 100.
ListSortTimes() - Constructor for class ListSortTimes
 
lookup(Object) - Method in class HashTable
Lookup the entry of the given key.

M

main(String[]) - Static method in class BasicRecursionTest
Call the recursiveSum method and print the result to stdout.
main(String[]) - Static method in class BinarySearchTreeTest
Allocate a BinarySearchTree class and call its methods with some test data.
main(String[]) - Static method in class BinaryTreePlusTest
Allocate a BinaryTreePlus class and call its methods with some test data.
main(String[]) - Static method in class BinaryTreeTest
Allocate a BinaryTree class and call its methods with some test data.
main(String[]) - Static method in class BooksLinkedListTest
Allocate a BooksLinkedList class and call its methods with some test data.
main(String[]) - Static method in class FindLargestTest
Allocate a FindLargest class and call its methods with some test data.
main(String[]) - Static method in class HashTableTest
Allocate a HashTable and test the HashTable methods.
main(String[]) - Static method in class HashTableTestSimple
Allocate a HashTable and test the insert and lookup methods.
main(String[]) - Static method in class ListAsLinkedListTest
Allocate a ListAsLinkedList class and call its methods with some test data.
main(String[]) - Static method in class ListAsLinkedListTest2
Allocate a ListAsLinkedList class and call its methods with some test data.
main(String[]) - Static method in class ListPutFirstTest
Construct ListAsArray and ListAsLinkedList classes and call their putFirst methods on lists of sizes 1000 to 30000 elements, in increments of 100.
main(String[]) - Static method in class ListSearchTest
Allocate a ListSearch class and call its methods with some test data.
main(String[]) - Static method in class ListSortAndSearchTest
Allocate a ListSortAndSearch class object and call its methods on a list of 9000 elements.
main(String[]) - Static method in class ListSortTimes
Call ListSortAndSearch.sort on lists of sizes 100 through 5000, in increments of 100.
main(String[]) - Static method in class SimpleArraySearchTest
Allocate a SimpleArraySearch class and call its method with some test data.
makeEmpty() - Method in class BooksLinkedList
Make this empty.

N

name - Variable in class InformationRecord
Person name
name - Variable in class InformationRecord2
Person name

O

onlyLeftChild() - Method in class BinaryTreePlusNode
Return true if this node is an only left child.
onlyRightChild() - Method in class BinaryTreePlusNode
Return true if this node is an only left child.

P

parent - Variable in class BinaryTreePlusNode
Parent node
phase1() - Static method in class HashTableTest
Construct tables of sizes 1, 5, 500, and the default size; confirm the size of each table.
phase2() - Static method in class HashTableTest
Test enter, lookup, and delete on table of size 1.
phase3(HashTable) - Static method in class HashTableTest
Test enter method by filling up a table of size 5, including check of the TableFull exception.
phase4(HashTable) - Static method in class HashTableTest
Test the lookup method on the full table of size 5, expecting O(N) performance on lookups given full table.
phase5(HashTable) - Static method in class HashTableTest
Test the delete method on table of size 5, removing each entry.
phase6(HashTable) - Static method in class HashTableTest
Repeat phases 3 through 5 to exercise the somewhat tricky implementation of delete that uses active/inactive flags.
phase7(HashTable) - Static method in class HashTableTest
Successively test the enter, lookup, and delete methods on the the same table of size 5, with 0 through 7 entries.
phase9(HashTable) - Static method in class HashTableTest
Test enter and lookup on a larger more sparsely populated table, expecting O(c) performance.
pop() - Method in class BinaryTreePlus
Push from a simple array-based stack.
position - Variable in class BinaryTreePlusNode
Ordinal position of the value this node
push(BinaryTreePlusNode) - Method in class BinaryTreePlus
Push onto a simple array-based stack.
putFirst(Object) - Method in class ListAsArray
Add the given element to the front of this.
putFirst(Object) - Method in class ListAsLinkedList
Add the given element to the front of this.

R

remove(Object) - Method in class BinarySearchTree
Remove the node containing the given value, if any, retaining the proper binary search tree structure.
remove(Object, BinaryTreeNode) - Method in class BinarySearchTree
Recursive work doer for remove(Object).
removeTreeModelListener(TreeModelListener) - Method in class BinaryTreePlus
This is a TreeModel method we don't care about.
right - Variable in class BinaryTreeNode
Pointer to the right subtree of this node
right - Variable in class BinaryTreePlusNode
Pointer to the right subtree of this node
root - Variable in class BinaryTreePlus
The root of this tree

S

search - Static variable in class ListSearchTest
Class to be tested
searchArray(int[], int) - Method in class SimpleArraySearch
Return the position in the given numbers array of the first occurance of the given numeric value.
SimpleArraySearch - class SimpleArraySearch.
Class SimpleArraySearch contains a single method to search for a number in an int-value array.
SimpleArraySearch() - Constructor for class SimpleArraySearch
 
SimpleArraySearchTest - class SimpleArraySearchTest.
Class SimpleArraySearchTest illustrates the use of the method defined in the companion SimpleArraySearch class.
SimpleArraySearchTest() - Constructor for class SimpleArraySearchTest
 
size - Variable in class BinaryTreePlus
The size of this tree, i.e., the number of nodes it contains
size - Variable in class BinaryTreePlusNode
Size of subtree rooted at this node
size - Variable in class HashTable
Table size
sort() - Method in class ListAsLinkedList
Sort this in ascending order, based on the ordering defined by the compareTo method applied this' elements.
sort(Object[]) - Method in class ListSortAndSearch
Perform a bubble sort on the given list.
stack - Variable in class BinaryTreePlus
Traversal stack
STACK_SIZE - Variable in class BinaryTreePlus
Size of traversal stack, good for trees depths up to 100
stackIndex - Variable in class BinaryTreePlus
Current stack index
sumArray(int[], int) - Method in class BasicRecursion
Return the sum of the elements in the given numbers array, starting at the given index position.
swapNodeValues(ListAsLinkedList.ListNode, ListAsLinkedList.ListNode) - Method in class ListAsLinkedList
Swap the values in the given two nodes.

T

table - Variable in class HashTable
The table array
table1 - Static variable in class HashTableTest
Testing tables
table5 - Static variable in class HashTableTest
Testing tables
table500 - Static variable in class HashTableTest
Testing tables
tableDefault - Static variable in class HashTableTest
Testing tables
testMethods(Object[], int) - Static method in class ListSearchTest
Test both methods by searching for each element in the list.
toString() - Method in class BinarySearchTree
Convert this to a preorder string of the form: root left subtree ...
toString() - Method in class BinaryTree
Convert this to a preorder string of the form: root left subtree ...
toString() - Method in class BinaryTreePlus
Convert this to a preorder string of the form: root left subtree ...
toString() - Method in class BinaryTreePlusNode
Convert this to a preorder string of the same form as BinarySearchTree.toString.
toString() - Method in class BooksLinkedList
Generate the string representation of this as a space-delimted sequence of elements.
toString() - Method in class HashTable
Return this as a newline-delimited string of the form Entry 0: value ...
toString() - Method in class HashTableTest.IntEntry
Return the value of this entry as a string.
toString() - Method in class HashTableTestSimple.IntEntry
Return the value of this entry as a string.
toString() - Method in class InformationRecord
Convert this to a four-tuple of the form {name, age, id, address}.
toString() - Method in class InformationRecord2
Convert this to a four-tuple of the form {name, age, id, address}.
toString() - Method in class ListAsArray
Convert this to a space-delimited string of its elements.
toString() - Method in class ListAsLinkedList
Convert this to a space-delimited string of its elements.
toString(BinaryTreeNode, int) - Method in class BinarySearchTree
Recursive work doer for toString(), converting the given node value to a string, preceded by indent spacing, followed by the recursive toString of the left and right subtrees.
toString(BinaryTreeNode, int) - Method in class BinaryTree
Recursive work doer for toString(), converting the given node value to a string, preceded by indent spacing, followed by the recursive toString of the left and right subtrees.
toString(BinaryTreePlusNode, int) - Static method in class BinaryTreePlus
Recursive work doer for toString(), converting the given node value to a string, preceded by indent spacing, followed by the recursive toString of the left and right subtrees.
toString(Object[]) - Method in class ListSortAndSearch
Make a space-delimited string out of the elements of an array-based list.
traversePreorder(BinaryTreePlusNode) - Method in class BinaryTreePlus
Perform a very basic recursive preorder traversal, returning a space-delimited string of the node values.
traverseWithNestedLoop() - Method in class BinaryTreePlus
Attempt to perform an iterative preorder tree traversal using a doubly nested loop.
traverseWithStack() - Method in class BinaryTreePlus
Perform an iterative preorder tree traversal using an explicit stack.

V

value - Variable in class BinaryTreeNode
The data value of this node
value - Variable in class BinaryTreePlusNode
The data value of this node
value - Variable in class HashTableTest.IntEntry
The single Integer value of this hash table entry
value - Variable in class HashTableTestSimple.IntEntry
The single Integer value of this hash table entry
valueForPathChanged(TreePath, Object) - Method in class BinaryTreePlus
This is a TreeModel method we don't care about.

A B C D E F G H I L M N O P R S T V