A B C D E F G H I K L M P R S T U W

A

add(Item) - Method in class u6.ArrayHeap
Adds the given item in the heap and updates the size and the height values.
add(Item) - Method in class u6.Heap
Adds the given item in the heap and updates the size and the height values.
add(Object, Object) - Method in class u6.Heap
Adds a node with the given key and value in the heap and updates the size and the height values.
ALPHABET_SIZE - Static variable in class BoyerMoore
 
ArrayHeap - class u6.ArrayHeap.
Array based implementation of Heap Data Structure.
ArrayHeap(Comparator) - Constructor for class u6.ArrayHeap
Constructs an empty heap with the specified comparator
ArrayHeap(Comparator, Item[]) - Constructor for class u6.ArrayHeap
Bottom-Up construction.

B

bottomUp(int) - Method in class u6.ArrayHeap
Constructs the items of the subarray starting from loInx, i.e. items[sInx..size - 1] into the heap container.
bottomUp(Item[], Comparator, int) - Method in class u6.HeapSort
Constructs the items of the subarray starting from loInx, i.e. items[sInx..size - 1] into the heap container.
BoyerMoore - class BoyerMoore.
Implementation of the Boyer-Moore Algorithm for pattern matching.
BoyerMoore(String, String) - Constructor for class BoyerMoore
 
BubbleSort - class utils.BubbleSort.
Sorts the array using an in-place BubbleSort algorithm.
BubbleSort() - Constructor for class utils.BubbleSort
 

C

cmp - Variable in class u6.Heap
Comparator, defining a total relation on the keys
compare(Object, Object) - Method in class utils.IntegerComparator
 
computeHeight(int) - Static method in class u6.Heap
Computes the height of a heap with a given size.
convertToText(String, String) - Static method in class u7.ESortUtils
Converts file of Item objects into file that stores numbered lines of the string representation of that objects.

D

DEFAULT_BUFFER_SIZE - Static variable in class upr.u7.ExternalSort
 
downBubbling() - Method in class u6.ArrayHeap
Restores the order-property of the heap, in the case it's violated by the root.
downBubbling(int) - Method in class u6.ArrayHeap
Locally restores the order-property at the node with the given (absolute) index and the given last node.
downBubbling(Item[], Comparator, int) - Method in class u6.HeapSort
Locally restores the order-property at the node with the given (absolute) index and the given last node.

E

equals(Object) - Method in class utils.IntegerComparator
 
ESortUtils - class u7.ESortUtils.
 
ESortUtils() - Constructor for class u7.ESortUtils
 
ExternalSort - class upr.u7.ExternalSort.
Simple External Sort, uses MergeSort with two scratch files and a buffer.
ExternalSort() - Constructor for class upr.u7.ExternalSort
Default Constructor
ExternalSort(int) - Constructor for class upr.u7.ExternalSort
Constructs an object that sorts files of Item objects, with given 'bufferSize' - the size of each section (buffer) used in the external sorting.
extract() - Method in interface u6.PriorityQueue
Extracts the element with greater priority, i.e. with minimal key.
extract() - Method in class u6.HeapPriorityQueue
Extracts the element with greater priority, i.e. with minimal key.
extractItem() - Method in class u6.ArrayHeap
Extracts the root of the Heap and updates the size and the height values.
extractItem() - Method in class u6.Heap
Extracts the root of the Heap and updates the size and the height values.

F

findKthInt(int[], int, int, int) - Static method in class SelectionIP
Finds the value of the element with index 'k' in the sorted subarray (without sorting the array), The method finds the correct value when left <= k <= right.

G

getHeight() - Method in class u6.Heap
Reads the height of the heap.
getKey() - Method in class utils.Item
 
getMatchPoint() - Method in class KMPMatch
 
getValue() - Method in class utils.Item
 

H

Heap - class u6.Heap.
Abstract Heap class.
Heap(Comparator) - Constructor for class u6.Heap
Constructs an empty heap with the given comparator.
HeapPriorityQueue - class u6.HeapPriorityQueue.
Heap implementation of the PriorityQueue.
HeapPriorityQueue(Comparator) - Constructor for class u6.HeapPriorityQueue
 
HeapPriorityQueue(Heap) - Constructor for class u6.HeapPriorityQueue
 
HeapSort - class u6.HeapSort.
 
HeapSort() - Constructor for class u6.HeapSort
 
height - Variable in class u6.Heap
The height of the heap; a heap with one element has height = 1.

I

insert(Object, Object) - Method in interface u6.PriorityQueue
Inserts an element with priority key in this priority queue.
insert(Object, Object) - Method in class u6.HeapPriorityQueue
Inserts an element with priority key in this priority queue.
IntegerComparator - class utils.IntegerComparator.
Comparator Implementation for keys of type Integer.
IntegerComparator() - Constructor for class utils.IntegerComparator
 
isComparable(Object) - Method in class utils.IntegerComparator
 
isEmpty() - Method in interface u6.PriorityQueue
Checks whether this priority queue is empty.
isEmpty() - Method in class u6.HeapPriorityQueue
Checks whether this priority queue is empty.
isEmpty() - Method in class u6.Heap
Checks whether the heap is empty.
Item - class utils.Item.
Composition of key-value data.
Item(Object, Object) - Constructor for class utils.Item
 

K

KMPMatch - class KMPMatch.
 
KMPMatch(String, String) - Constructor for class KMPMatch
 

L

load(Item[], ObjectInputStream) - Static method in class u7.ESortUtils
Reads elements from the input stream into the buffer 'items'.

M

match() - Method in class KMPMatch
 
match() - Method in class BoyerMoore
Searches the pattern in the text.
match1() - Method in class KMPMatch
 
median5(int[], int) - Static method in class SelectionIP
Computes the median value of the subarray of fife elements starting from the element with index sInx, performing at most 6 comparisions.
minKey() - Method in interface u6.PriorityQueue
Reads the minimal key in this priority queue, without removing the element.
minKey() - Method in class u6.HeapPriorityQueue
Reads the minimal key in this priority queue, without removing the element.
minKeyElement() - Method in interface u6.PriorityQueue
Reads the element with minimal key.
minKeyElement() - Method in class u6.HeapPriorityQueue
Reads the element with minimal key.

P

partition(int[], int, int, int) - Static method in class SelectionIP
Partition the subarray starting from left to right, using els[medInx] for pivot: the elements to the left are smaller and the elements to the right are greater or equal to the pivot.
PriorityQueue - interface u6.PriorityQueue.
Priority Queue.

R

readMinElement() - Method in class u6.ArrayHeap
Reads the element value of the item, stored in the root of the heap without removing the root.
readMinElement() - Method in class u6.Heap
Reads the element value of the item, stored in the root of the heap without removing the root.
readMinKey() - Method in class u6.ArrayHeap
Reads the key, stored in the root of the heap, without extracting the root.
readMinKey() - Method in class u6.Heap
Reads the key, stored in the root of the heap, without extracting the root.
readObject(ObjectInputStream) - Static method in class u7.ESortUtils
Reads an Item object from the object input stream

S

SEC_SIZE - Static variable in class SelectionIP
 
SelectionIP - class SelectionIP.
This class contains methods for implementing the in-place algorithm for selecting the k-th element from an unsorted array.
SelectionIP() - Constructor for class SelectionIP
 
setValue(Object) - Method in class utils.Item
 
size - Variable in class u6.Heap
The number of elements in this heap
size() - Method in interface u6.PriorityQueue
Gets the number of entries in this priority queue.
size() - Method in class u6.HeapPriorityQueue
Gets the number of entries in this priority queue.
size() - Method in class u6.Heap
Reads the number of items stored in the heap.
sort(Item[], Comparator) - Method in class u6.HeapSort
 
sort(Item[], Comparator) - Method in interface utils.SortObject
 
sort(String, Comparator) - Method in interface utils.SortFile
Sort the file named 'fname' that contains objects of type Item
sort(String, Comparator) - Method in class upr.u7.ExternalSort
Sorts the file 'fname' of objects of class Item using the given comparator
SortFile - interface utils.SortFile.
 
sortIP(int[]) - Static method in class utils.BubbleSort
 
sortIP(int[], int, int) - Static method in class utils.BubbleSort
 
SortObject - interface utils.SortObject.
 
swap(int[], int, int) - Static method in class SelectionIP
Swaps the elemets els[i] and els[j] of the array els.
swap(int, int) - Method in class u6.ArrayHeap
Swaps the elements with index i and j.
swap(Item[], int, int) - Method in class u6.HeapSort
Swaps the elements with index i and j.

T

toArray(Object[]) - Method in class u6.ArrayHeap
 
toString() - Method in class utils.Item
 

U

upBubbling() - Method in class u6.ArrayHeap
Restores the order-property of the heap, in the case it's violated by the last node.
upBubbling(int) - Method in class u6.ArrayHeap
Locally restores the order-property at the node with the given (absolute) index.

W

writeBuffer(ObjectOutputStream, Item[], int) - Static method in class u7.ESortUtils
Saves the elements from the buffer 'items'.

A B C D E F G H I K L M P R S T U W