A B C D F G H I M N P Q R S T U 

A

AVLTree<E> - Class in phasea
TODO: REPLACE this comment with your own as appropriate.
AVLTree(Comparator<? super E>) - Constructor for class phasea.AVLTree
 

B

BinarySearchTree<E> - Class in cse332.datastructures
BinarySearchTree implements the DataCounter interface using a binary search tree.
BinarySearchTree(Comparator<? super E>) - Constructor for class cse332.datastructures.BinarySearchTree
Create an empty binary search tree.
BinarySearchTree.BSTNode - Class in cse332.datastructures
Inner class to represent a node in the tree.
BinarySearchTree.BSTNode(E) - Constructor for class cse332.datastructures.BinarySearchTree.BSTNode
Create a new data node and increment the enclosing tree's size.

C

children - Variable in class cse332.datastructures.BinarySearchTree.BSTNode
 
close() - Method in class main.FileWordReader
 
comparator - Variable in class cse332.datastructures.BinarySearchTree
 
Comparator<E> - Interface in cse332.interfaces
Interface for function objects that compare elements
comparator - Variable in class cse332.interfaces.Sorter
The comparator to sort with
comparator - Variable in class cse332.ngram.NGramComparator
The actual comparator to do the real work.
compare(E, E) - Method in interface cse332.interfaces.Comparator
Returns a result representing the comparison of e1 and e2.
compare(NGram, NGram) - Method in class cse332.ngram.NGramComparator
 
compare(DataCount<NGram>, DataCount<NGram>) - Method in class main.DataCountNGramComparator
 
compare(DataCount<String>, DataCount<String>) - Method in class main.DataCountStringComparator
 
compare(String, String) - Method in class phasea.StringComparator
 
count - Variable in class cse332.datastructures.BinarySearchTree.BSTNode
 
count - Variable in class cse332.datastructures.DataCount
The count for the data element.
countWords(String, DataCounter<NGram>, int) - Static method in class main.NGramCount
This method adds all the n-grams in the file to counter.
cse332.datastructures - package cse332.datastructures
 
cse332.exceptions - package cse332.exceptions
 
cse332.interfaces - package cse332.interfaces
 
cse332.ngram - package cse332.ngram
 
cse332.sorts - package cse332.sorts
 

D

data - Variable in class cse332.datastructures.BinarySearchTree.BSTNode
 
data - Variable in class cse332.datastructures.DataCount
The data element whose count we are recording.
data - Variable in class cse332.interfaces.Heap
Comments deliberately elided.
DataCount<E> - Class in cse332.datastructures
Simple class to hold a piece of data and its count.
DataCount(E, int) - Constructor for class cse332.datastructures.DataCount
Create a new data count.
DataCounter<E> - Class in cse332.interfaces
Interface for a data structure that allows you to count the number of times you see each piece of data.
DataCounter() - Constructor for class cse332.interfaces.DataCounter
 
DataCountNGramComparator - Class in main
A Comparator for DataCount that sorts two data-counts in the order we need for the output of NGramCount: Higher frequency comes first and frequency ties are resolved in alphabetical order.
DataCountNGramComparator() - Constructor for class main.DataCountNGramComparator
 
DataCountStringComparator - Class in main
A Comparator for DataCount that sorts two data-counts first by frequency and then by alphabetical order.
DataCountStringComparator() - Constructor for class main.DataCountStringComparator
 
deleteMin() - Method in class cse332.interfaces.Heap
 
deleteMin() - Method in class phasea.FourHeap
 

F

FileWordReader - Class in main
FileWordReader reads words from a file one-by-one, converting to lower case and eliminating punctuation.
FileWordReader(String) - Constructor for class main.FileWordReader
 
findMin() - Method in class cse332.interfaces.Heap
 
findMin() - Method in class phasea.FourHeap
 
FourHeap<E> - Class in phasea
TODO: Replace this comment with your own as appropriate.
FourHeap(int, Comparator<? super E>) - Constructor for class phasea.FourHeap
 

G

GArrayStack<E> - Class in cse332.datastructures
A thin wrapper for Java's Stack that only implements the Stack ADT.
GArrayStack() - Constructor for class cse332.datastructures.GArrayStack
Initializes an empty stack.
getCount(E) - Method in class cse332.datastructures.BinarySearchTree
Returns the current count for the data.
getCount(E) - Method in class cse332.interfaces.DataCounter
Returns the current count for the data.
getCount(E) - Method in class phasea.MoveToFrontList
 
getCount(E) - Method in class phaseb.HashTable
 
getCountsArray(DataCounter<E>) - Static method in class main.NGramCount
 
getDataCounter(NGram) - Method in class cse332.datastructures.NGramFrequencySortedArrayMap
 
getDataCounter(NGram) - Method in class cse332.interfaces.NGramTable
Returns the current frequency table for the ngram.
getDataCounter(NGram) - Method in class phaseb.NGramFrequencyHashMap
 
getFirstWord() - Method in class cse332.ngram.NGram
Returns the first word of the NGram
getIterator() - Method in class cse332.datastructures.BinarySearchTree
Clients must not increment counts between an iterator's creation and its final use.
getIterator() - Method in class cse332.interfaces.DataCounter
Clients must not increment counts between an iterator's creation and its final use.
getIterator() - Method in class phasea.MoveToFrontList
 
getIterator() - Method in class phaseb.HashTable
 
getNext() - Method in class main.Markov
 
getNGrams() - Method in class cse332.datastructures.NGramFrequencySortedArrayMap
 
getNGrams() - Method in class cse332.interfaces.NGramTable
Clients must not change frequency tables or keys between an iterator's creation and its final use.
getNGrams() - Method in class phaseb.NGramFrequencyHashMap
 
getSize() - Method in class cse332.datastructures.BinarySearchTree
The number of unique data elements in the structure.
getSize() - Method in class cse332.interfaces.DataCounter
The number of unique data elements in the structure.
getSize() - Method in class phasea.MoveToFrontList
 
getSize() - Method in class phaseb.HashTable
 
getTotal() - Method in class cse332.datastructures.BinarySearchTree
 
getTotal() - Method in class cse332.interfaces.DataCounter
The number of total words (including duplicates) in the structure.
getTotal() - Method in class phasea.MoveToFrontList
 
getTotal() - Method in class phaseb.HashTable
 
GStack<T> - Interface in cse332.interfaces
Interface for a type-generic stack.

H

hash(E) - Method in interface cse332.interfaces.Hasher
Returns a hash code for e.
hash(NGram) - Method in class cse332.ngram.NGramHasher
 
hash(String) - Method in class phaseb.StringHasher
 
Hasher<E> - Interface in cse332.interfaces
Interface for function objects that hash data
hasher - Variable in class cse332.ngram.NGramHasher
The actual hasher to do the real work.
HashTable<E> - Class in phaseb
TODO: Replace this comment with your own as appropriate.
HashTable() - Constructor for class phaseb.HashTable
 
hasNext() - Method in class cse332.interfaces.SimpleIterator
Returns whether there are more elements to iterate through
hasNext() - Method in class main.FileWordReader
 
Heap<E> - Class in cse332.interfaces
Interface for a Heap (priority queue) that your FourHeap should implement
Heap(int) - Constructor for class cse332.interfaces.Heap
 
HeapSort<E> - Class in phasea
 
HeapSort(Comparator<E>) - Constructor for class phasea.HeapSort
 

I

incCount(E) - Method in class cse332.datastructures.BinarySearchTree
Increment the count for a particular data element.
incCount(E) - Method in class cse332.interfaces.DataCounter
Increment the count for a particular data element.
incCount(E) - Method in class phasea.MoveToFrontList
 
incCount(E) - Method in class phaseb.HashTable
 
insert(E) - Method in class cse332.interfaces.Heap
 
insert(E) - Method in class phasea.FourHeap
 
InsertionSort<E> - Class in cse332.sorts
 
InsertionSort(Comparator<E>) - Constructor for class cse332.sorts.InsertionSort
 
isEmpty() - Method in class cse332.datastructures.GArrayStack
 
isEmpty() - Method in interface cse332.interfaces.GStack
This method checks if the stack is empty.
isEmpty() - Method in class cse332.interfaces.Heap
 
isEmpty() - Method in class phasea.FourHeap
 
iterator() - Method in class cse332.interfaces.SimpleIterator
 

M

main - package main
 
main(String[]) - Static method in class main.Markov
 
main(String[]) - Static method in class main.NGramCount
TODO: Replace this comment with your own as appropriate.
main(String[]) - Static method in class main.ParseFBMessages
 
Markov - Class in main
An executable that generates text in the style of the provided input file.
Markov(String, int, int) - Constructor for class main.Markov
 
MoveToFrontList<E> - Class in phasea
TODO: REPLACE this comment with your own as appropriate.
MoveToFrontList() - Constructor for class phasea.MoveToFrontList
 

N

next() - Method in class cse332.interfaces.SimpleIterator
Returns the next element in the iterator
next() - Method in class main.FileWordReader
 
NGram - Class in cse332.ngram
 
NGram(String[]) - Constructor for class cse332.ngram.NGram
Constructs a new NGram out of words.
NGramComparator - Class in cse332.ngram
This class provides a compare function for NGrams.
NGramComparator() - Constructor for class cse332.ngram.NGramComparator
Initializes a new NGramComparator.
NGramCount - Class in main
An executable that counts the words in a files and prints out the counts in descending order.
NGramCount() - Constructor for class main.NGramCount
 
NGramFrequencyHashMap - Class in phaseb
 
NGramFrequencyHashMap(Comparator<NGram>, Hasher<NGram>, int) - Constructor for class phaseb.NGramFrequencyHashMap
 
NGramFrequencySortedArrayMap - Class in cse332.datastructures
An example implementation of NGramTable as a sorted array.
NGramFrequencySortedArrayMap(Comparator<NGram>, int) - Constructor for class cse332.datastructures.NGramFrequencySortedArrayMap
Initializes a new NGramSortedArrayTable with the provided comparator and capacity.
NGramHasher - Class in cse332.ngram
This class provides a hash function for NGrams.
NGramHasher() - Constructor for class cse332.ngram.NGramHasher
Initializes a new NGramHasher.
NGramTable - Class in cse332.interfaces
Interface for a data structure that stores a mapping from NGrams to the frequencies of following words.
NGramTable() - Constructor for class cse332.interfaces.NGramTable
 
NotYetImplementedException - Exception in cse332.exceptions
 
NotYetImplementedException() - Constructor for exception cse332.exceptions.NotYetImplementedException
 

P

ParseFBMessages - Class in main
 
ParseFBMessages() - Constructor for class main.ParseFBMessages
 
peek() - Method in class cse332.datastructures.GArrayStack
 
peek() - Method in interface cse332.interfaces.GStack
This method returns the element at the front of the stack.
phasea - package phasea
 
phaseb - package phaseb
 
pop() - Method in class cse332.datastructures.GArrayStack
 
pop() - Method in interface cse332.interfaces.GStack
This method removes the element at the front of the stack.
push(E) - Method in class cse332.datastructures.GArrayStack
 
push(T) - Method in interface cse332.interfaces.GStack
This method adds an element to front of the stack.

Q

QuickSort<E> - Class in phaseb
 
QuickSort(Comparator<E>) - Constructor for class phaseb.QuickSort
 

R

remove() - Method in class cse332.interfaces.SimpleIterator
 
remove() - Method in class main.FileWordReader
 
root - Variable in class cse332.datastructures.BinarySearchTree
 

S

SimpleIterator<E> - Class in cse332.interfaces
Interface for a simpler iterator for returning DataCount elements from a DataCounter one at a time.
SimpleIterator() - Constructor for class cse332.interfaces.SimpleIterator
 
size - Variable in class cse332.datastructures.BinarySearchTree
 
size - Variable in class cse332.interfaces.Heap
 
sort(E[]) - Method in class cse332.interfaces.Sorter
This method sorts array using the Sorter's comparator.
sort(E[]) - Method in class cse332.sorts.InsertionSort
Sort the count array ordered according to the comparator.
sort(E[]) - Method in class phasea.HeapSort
 
sort(E[]) - Method in class phaseb.QuickSort
 
sort(E[]) - Method in class phaseb.TopKSort
 
Sorter<E> - Class in cse332.interfaces
Interface for function objects that sort arrays of elements
Sorter(Comparator<E>) - Constructor for class cse332.interfaces.Sorter
Takes in a comparator and initializes a Sorter with that comparator
StringComparator - Class in phasea
TODO: REPLACE this comment with your own as appropriate.
StringComparator() - Constructor for class phasea.StringComparator
 
StringHasher - Class in phaseb
 
StringHasher() - Constructor for class phaseb.StringHasher
 

T

TopKSort<E> - Class in phaseb
 
TopKSort(Comparator<E>, int) - Constructor for class phaseb.TopKSort
 
toString() - Method in class cse332.datastructures.DataCount
 
toString() - Method in class cse332.interfaces.DataCounter
 
toString() - Method in class cse332.interfaces.NGramTable
 
toString() - Method in class cse332.ngram.NGram
 
total - Variable in class cse332.datastructures.BinarySearchTree
 

U

update(String) - Method in class cse332.ngram.NGram
Returns a new NGram with the first word shifted off and the provided word on the end.
A B C D F G H I M N P Q R S T U