A B C D E F G H I K L M N O P Q R S T U V W X Y
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- add(Vector) - Method in class dsa.Vector
-
Returns the sum of this vector and
other
. - add(Item) - Method in interface dsa.Bag
-
Adds
item
to this bag. - add(Item) - Method in class dsa.LinkedBag
- add(Item) - Method in class dsa.ResizingArrayBag
- add(Key) - Method in class dsa.Set
-
Adds
key
to this set, if it is not already present. - addEdge(int, int) - Method in class dsa.DiGraph
-
Adds the directed edge
v→w
to this digraph. - addEdge(int, int) - Method in class dsa.Graph
-
Adds an undirected edge between vertices
v
andw
in this graph. - addEdge(DiEdge) - Method in class dsa.EdgeWeightedDiGraph
-
Adds a directed edge
e
to this edge-weighted digraph. - addEdge(Edge) - Method in class dsa.EdgeWeightedGraph
-
Adds an edge
e
to this edge-weighted graph. - adj(int) - Method in class dsa.DiGraph
-
Returns the vertices adjacent from vertex
v
in this digraph. - adj(int) - Method in class dsa.EdgeWeightedDiGraph
-
Returns the directed edges incident from vertex
v
in this edge-weighted digraph. - adj(int) - Method in class dsa.EdgeWeightedGraph
-
Returns the edges incident on vertex
v
in this edge-weighted graph. - adj(int) - Method in class dsa.Graph
-
Returns the vertices adjacent to vertex
v
in this graph. - Alphabet - Class in dsa
-
An immutable data type to represent an alphabet.
- Alphabet() - Constructor for class dsa.Alphabet
-
Constructs a new alphabet using characters 0 through 255.
- Alphabet(String) - Constructor for class dsa.Alphabet
-
Constructs a new alphabet from the string of characters
s
. - amount() - Method in class dsa.Transaction
-
Returns the amount of this transaction.
- ASCII - Static variable in class dsa.Alphabet
-
The ASCII alphabet (0-127).
- atan2Order() - Method in class dsa.Point2D
-
Returns a comparator for comparing two points by the atan2 angle (-pi to pi) they make with this point.
B
- Bag<Item> - Interface in dsa
-
This interface specifies the API for the bag data structure.
- BASE64 - Static variable in class dsa.Alphabet
-
The base-64 alphabet (64 characters).
- BasicST<Key,Value> - Interface in dsa
-
This interface specifies the API for the basic symbol table data structure.
- BFSDiPaths - Class in dsa
-
An immutable data type to compute shortest paths from a fixed source vertex to any other vertex in a directed graph.
- BFSDiPaths(DiGraph, int) - Constructor for class dsa.BFSDiPaths
-
Computes shortest paths from source vertex
s
to every other vertex in the digraphG
. - BFSPaths - Class in dsa
-
An immutable data type to compute shortest paths between a fixed source vertex and any other vertex in an undirected graph.
- BFSPaths(Graph, int) - Constructor for class dsa.BFSPaths
-
Computes shortest paths between source vertex
s
and every other vertex in the graphG
. - BINARY - Static variable in class dsa.Alphabet
-
The binary alphabet { 0, 1 }.
- BinarySearch - Class in dsa
-
This library implements binary search.
- BinarySearch() - Constructor for class dsa.BinarySearch
- BinarySearchST<Key extends Comparable<Key>,Value> - Class in dsa
-
This data type provides an implementation of the ordered symbol table (OrderedST) API, using as underlying data structures an ordered array for the keys and a parallel array for the values.
- BinarySearchST() - Constructor for class dsa.BinarySearchST
-
Constructs an empty symbol table.
- BinarySearchTreeST<Key extends Comparable<Key>,Value> - Class in dsa
-
This data type provides an implementation of the ordered symbol table (OrderedST) API, using a binary search tree (BST) as the underlying data structure.
- BinarySearchTreeST() - Constructor for class dsa.BinarySearchTreeST
-
Constructs an empty symbol table.
- Bubble - Class in dsa
-
This library implements bubble sort.
- Bubble() - Constructor for class dsa.Bubble
C
- ceiling(Key) - Method in class dsa.BinarySearchST
- ceiling(Key) - Method in class dsa.BinarySearchTreeST
- ceiling(Key) - Method in interface dsa.OrderedST
-
Returns the smallest key in this symbol table that is larger than or equal to
key
. - ceiling(Key) - Method in class dsa.RedBlackBinarySearchTreeST
- change(int, Key) - Method in class dsa.IndexMaxPQ
-
Changes the key associated with index
i
tokey
. - change(int, Key) - Method in class dsa.IndexMinPQ
-
Changes the key associated with index
i
tokey
. - compareTo(Counter) - Method in class dsa.Counter
-
Returns a comparison of this counter with
other
, by their tally. - compareTo(Date) - Method in class dsa.Date
-
Returns a chronological comparison of this date with
other
. - compareTo(Edge) - Method in class dsa.Edge
-
Returns a comparison of this edge with
other
by their weights. - compareTo(Point2D) - Method in class dsa.Point2D
-
Returns a comparison of this point with
other
, by their x- and y-coordinates. - compareTo(Transaction) - Method in class dsa.Transaction
-
Returns a comparison of this transaction with
other
, by amount. - compress() - Static method in class dsa.Genome
-
Reads from standard input a sequence characters over the alphabet { A, C, G, T }; compresses them using two bits per character; and writes the results to standard output.
- compress() - Static method in class dsa.Huffman
-
Reads from standard input a sequence of bytes; compresses them using Huffman codes with an 8-bit alphabet; and writes the results to standard output.
- compress() - Static method in class dsa.RunLength
-
Reads from standard input a sequence of bits; compresses them using run-length coding with 8-bit run lengths; and writes the results to standard output.
- connected(int, int) - Method in class dsa.QuickFindUF
- connected(int, int) - Method in class dsa.QuickUnionUF
- connected(int, int) - Method in interface dsa.UF
-
Returns
true
if sitesp
andq
belong to the same component, andfalse
otherwise. - connected(int, int) - Method in class dsa.WeightedQuickUnionUF
- contains(char) - Method in class dsa.Alphabet
-
Returns
true
ifc
is a character in this alphabet, andfalse
otherwise. - contains(int) - Method in class dsa.IndexMaxPQ
-
Returns
true
ifi
is an index in this indexMaxPQ, andfalse
otherwise. - contains(int) - Method in class dsa.IndexMinPQ
-
Returns
true
ifi
is an index in this indexMinPQ, andfalse
otherwise. - contains(Point2D) - Method in class dsa.RectHV
-
Returns
true
if this rectangle contains the pointp
, andfalse
otherwise. - contains(String) - Method in class dsa.SymbolDiGraph
-
Returns
true
if this symbol digraph contains vertexs
, andfalse
otherwise. - contains(String) - Method in class dsa.SymbolGraph
-
Returns
true
if this symbol graph contains vertexs
, andfalse
otherwise. - contains(String) - Method in class dsa.TrieST
-
Returns
true
if this symbol table containskey
, andfalse
otherwise. - contains(Key) - Method in interface dsa.BasicST
-
Returns
true
if this symbol table containskey
, andfalse
otherwise. - contains(Key) - Method in class dsa.BinarySearchST
- contains(Key) - Method in class dsa.BinarySearchTreeST
- contains(Key) - Method in class dsa.LinearSearchST
- contains(Key) - Method in interface dsa.OrderedST
-
Returns
true
if this symbol table containskey
, andfalse
otherwise. - contains(Key) - Method in class dsa.RedBlackBinarySearchTreeST
- contains(Key) - Method in class dsa.SeparateChainingHashST
- contains(Key) - Method in class dsa.Set
-
Returns
true
if this set containskey
, andfalse
otherwise. - count() - Method in class dsa.QuickFindUF
- count() - Method in class dsa.QuickUnionUF
- count() - Method in interface dsa.UF
-
Returns the number of components.
- count() - Method in class dsa.WeightedQuickUnionUF
- count(double[]) - Static method in class dsa.Inversions
-
Returns the number of inversions in the array
a
. - count(int[]) - Static method in class dsa.Inversions
-
Returns the number of inversions in the array
a
. - count(Comparable[]) - Static method in class dsa.Inversions
-
Returns the number of inversions in the array
a
, according to the natural order of its objects. - count(Object[], Comparator) - Static method in class dsa.Inversions
-
Returns the number of inversions in the array
a
, according to the order induced by the comparatorc
. - Counter - Class in dsa
-
A data type to represent a counter.
- Counter(String) - Constructor for class dsa.Counter
-
Constructs a counter given its id.
- cycle() - Method in class dsa.DiCycle
-
Returns a directed cycle, or
null
.
D
- date() - Method in class dsa.Transaction
-
Returns the date of this transaction.
- Date - Class in dsa
-
An immutable data type to represent a date (day, month, and year).
- Date(int, int, int) - Constructor for class dsa.Date
-
Constructs a date from
month
,day
, andyear
. - Date(String) - Constructor for class dsa.Date
-
Constructs a date from a string
s
of the form the"MM/DD/YYYY"
. - dateOrder() - Static method in class dsa.Transaction
-
Returns a comparator for comparing two transactions by date.
- day() - Method in class dsa.Date
-
Returns the day (an integer between 1 and 31).
- DECIMAL - Static variable in class dsa.Alphabet
-
The decimal alphabet { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }.
- degree(int) - Method in class dsa.EdgeWeightedGraph
-
Returns the degree of vertex
v
in this edge-weighted graph. - degree(int) - Method in class dsa.Graph
-
Returns the degree of vertex
v
in this graph. - delete(int) - Method in class dsa.IndexMaxPQ
-
Removes the key associated with index
i
in this indexMaxPQ. - delete(int) - Method in class dsa.IndexMinPQ
-
Removes the key associated with index
i
in this indexMinPQ. - delete(String) - Method in class dsa.TrieST
-
Deletes
key
and the associated value from this symbol table. - delete(Key) - Method in interface dsa.BasicST
-
Deletes
key
and the associated value from this symbol table. - delete(Key) - Method in class dsa.BinarySearchST
- delete(Key) - Method in class dsa.BinarySearchTreeST
- delete(Key) - Method in class dsa.LinearSearchST
- delete(Key) - Method in interface dsa.OrderedST
-
Deletes
key
and the associated value from this symbol table. - delete(Key) - Method in class dsa.RedBlackBinarySearchTreeST
- delete(Key) - Method in class dsa.SeparateChainingHashST
- delete(Key) - Method in class dsa.Set
-
Deletes
key
from this set. - deleteMax() - Method in class dsa.BinarySearchST
- deleteMax() - Method in class dsa.BinarySearchTreeST
- deleteMax() - Method in interface dsa.OrderedST
-
Deletes the largest key and the associated value from this symbol table.
- deleteMax() - Method in class dsa.RedBlackBinarySearchTreeST
- deleteMin() - Method in class dsa.BinarySearchST
- deleteMin() - Method in class dsa.BinarySearchTreeST
- deleteMin() - Method in interface dsa.OrderedST
-
Deletes the smallest key and the associated value from this symbol table.
- deleteMin() - Method in class dsa.RedBlackBinarySearchTreeST
- delMax() - Method in class dsa.IndexMaxPQ
-
Removes the largest key from this indexMaxPQ and returns its associated index.
- delMax() - Method in class dsa.MaxPQ
-
Removes and returns the largest key in this maxPQ.
- delMin() - Method in class dsa.IndexMinPQ
-
Removes the smallest key from this indexMinPQ and returns its associated index.
- delMin() - Method in class dsa.MinPQ
-
Removes and returns the smallest key in this minPQ.
- dequeue() - Method in class dsa.LinkedQueue
- dequeue() - Method in interface dsa.Queue
-
Removes and returns the item at the front of this queue.
- dequeue() - Method in class dsa.ResizingArrayQueue
- DFSDiPaths - Class in dsa
-
An immutable data type to compute paths from a fixed source vertex to any other vertex in a directed graph.
- DFSDiPaths(DiGraph, int) - Constructor for class dsa.DFSDiPaths
-
Computes paths from source vertex
s
to every other vertex in the digraphG
. - DFSOrders - Class in dsa
-
An immutable data type to determine depth-first orders (pre, post, and reverse post) for a digraph.
- DFSOrders(DiGraph) - Constructor for class dsa.DFSOrders
-
Determines depth-first orders (pre, post, and reverse post) for the digraph G.
- DFSPaths - Class in dsa
-
An immutable data type to compute paths between a fixed source vertex and any other vertex in an undirected graph.
- DFSPaths(Graph, int) - Constructor for class dsa.DFSPaths
-
Computes paths between source vertex
s
and every other vertex in the graphG
. - DiCycle - Class in dsa
-
An immutable data type to determine whether a digraph has a directed cycle and, if so, find such a cycle.
- DiCycle(DiGraph) - Constructor for class dsa.DiCycle
-
Determines whether the digraph
G
has a directed cycle and, if so, finds such a cycle. - DiEdge - Class in dsa
-
An immutable data type to represent a weighted edge in an directed graph.
- DiEdge(int, int, double) - Constructor for class dsa.DiEdge
-
Constructs a directed edge from vertex
v
to vertexw
of the givenweight
. - diGraph() - Method in class dsa.SymbolDiGraph
-
Returns the digraph associated with this symbol digraph.
- DiGraph - Class in dsa
-
A data type to represent a directed graph.
- DiGraph(int) - Constructor for class dsa.DiGraph
-
Constructs an empty digraph with
V
vertices and 0 edges. - DiGraph(In) - Constructor for class dsa.DiGraph
-
Constructs a digraph from the input stream
in
. - Dijkstra - Class in dsa
-
An immutable data type to determine the shortest paths from a fixed source vertex to every other vertex in an edge-weighted digraph.
- Dijkstra(EdgeWeightedDiGraph, int) - Constructor for class dsa.Dijkstra
-
Determines the shortest paths from the source vertex
s
to every other vertex in the edge-weighted digraphG
. - dimension() - Method in class dsa.SparseVector
-
Returns the dimension of this vector.
- dimension() - Method in class dsa.Vector
-
Returns the dimension of this vector.
- direction() - Method in class dsa.Vector
-
Returns a unit vector in the direction of this vector.
- distanceSquaredTo(Point2D) - Method in class dsa.Point2D
-
Returns the squared Euclidean distance between this point and
other
. - distanceSquaredTo(Point2D) - Method in class dsa.RectHV
-
Returns the squared Euclidean distance between the point
p
and the closest point on this, and 0 if the point is within. - distanceTo(Point2D) - Method in class dsa.Point2D
-
Returns the Euclidean distance between this point and
other
. - distanceTo(Point2D) - Method in class dsa.RectHV
-
Returns the Euclidean distance between the point
p
and the closest point on this rectangle, and 0 if the point is within. - distanceToOrder() - Method in class dsa.Point2D
-
Returns a comparator for comparing two points by their distance to this point.
- distTo(int) - Method in class dsa.BFSDiPaths
- distTo(int) - Method in class dsa.BFSPaths
- distTo(int) - Method in class dsa.DFSDiPaths
- distTo(int) - Method in class dsa.DFSPaths
- distTo(int) - Method in class dsa.Dijkstra
- distTo(int) - Method in interface dsa.Paths
-
Returns the shortest distance between a designated source vertex and vertex
v
, or infinity. - DNA - Static variable in class dsa.Alphabet
-
The DNA alphabet { A, C, T, G }.
- dot(SparseVector) - Method in class dsa.SparseVector
-
Returns the dot product of this vector and
other
. - dot(Vector) - Method in class dsa.Vector
-
Returns the dot product of this vector and
other
. - draw() - Method in class dsa.Point2D
-
Draws this point using standard draw.
- draw() - Method in class dsa.RectHV
-
Draws this rectangle using standard draw.
- drawTo(Point2D) - Method in class dsa.Point2D
-
Draws a line between this point and
other
using standard draw. - dsa - package dsa
E
- E() - Method in class dsa.DiGraph
-
Returns the number of edges in this digraph.
- E() - Method in class dsa.EdgeWeightedDiGraph
-
Returns the number of edges in this edge-weighted digraph.
- E() - Method in class dsa.EdgeWeightedGraph
-
Returns the number of edges in this edge-weighted graph.
- E() - Method in class dsa.Graph
-
Returns the number of edges in this graph.
- Edge - Class in dsa
-
An immutable, comparable data type to represent a weighted edge in an undirected graph.
- Edge(int, int, double) - Constructor for class dsa.Edge
-
Constructs an edge between vertices
v
andw
of the given weight. - edges() - Method in class dsa.EdgeWeightedDiGraph
-
Returns all the directed edges in this edge-weighted digraph.
- edges() - Method in class dsa.EdgeWeightedGraph
-
Returns all the edges in this edge-weighted graph.
- edges() - Method in class dsa.Kruskal
-
Returns the edges in the MST.
- EdgeWeightedDiGraph - Class in dsa
-
A data type to represent a directed graph with weighted edges.
- EdgeWeightedDiGraph(int) - Constructor for class dsa.EdgeWeightedDiGraph
-
Constructs an empty edge-weighted digraph with
V
vertices and 0 edges. - EdgeWeightedDiGraph(In) - Constructor for class dsa.EdgeWeightedDiGraph
-
Constructs an edge-weighted digraph from the input stream
in
. - EdgeWeightedGraph - Class in dsa
-
A data type to represent an undirected graph with weighted edges.
- EdgeWeightedGraph(int) - Constructor for class dsa.EdgeWeightedGraph
-
Constructs an empty edge-weighted graph with
V
vertices and 0 edges. - EdgeWeightedGraph(In) - Constructor for class dsa.EdgeWeightedGraph
-
Constructs an edge-weighted graph from the input stream
in
. - either() - Method in class dsa.Edge
-
Returns one endpoint of this edge.
- enqueue(Item) - Method in class dsa.LinkedQueue
- enqueue(Item) - Method in interface dsa.Queue
-
Adds
item
to the end of this queue. - enqueue(Item) - Method in class dsa.ResizingArrayQueue
- equals(Object) - Method in class dsa.Counter
-
Returns
true
if this counter andother
have the same tally, andfalse
otherwise. - equals(Object) - Method in class dsa.Date
-
Returns
true
if this date is same asother
, andfalse
otherwise. - equals(Object) - Method in class dsa.Point2D
-
Returns
true
if this point and other have the same x- and y-coordinates, andfalse
otherwise. - equals(Object) - Method in class dsa.RectHV
-
Returns
true
if this rectangle and other have the same $x$- and $y$-bounds, and false otherwise. - expand() - Static method in class dsa.Genome
-
Reads from standard input a sequence of genome-compressed bits; expands each two bits into a character over the alphabet { A, C, G, T }; and writes the results to standard output.
- expand() - Static method in class dsa.Huffman
-
Reads from standard input a sequence of Huffman-compressed bits; expands them; and writes the results to standard output.
- expand() - Static method in class dsa.RunLength
-
Reads from standard input a sequence of runlength-compressed bits; expands them; and writes the results to standard output.
- EXTENDED_ASCII - Static variable in class dsa.Alphabet
-
The extended ASCII alphabet (0-255).
F
- find(int) - Method in class dsa.QuickFindUF
- find(int) - Method in class dsa.QuickUnionUF
- find(int) - Method in interface dsa.UF
-
Returns the canonical site of the component containing site
p
. - find(int) - Method in class dsa.WeightedQuickUnionUF
- floor(Key) - Method in class dsa.BinarySearchST
- floor(Key) - Method in class dsa.BinarySearchTreeST
- floor(Key) - Method in interface dsa.OrderedST
-
Returns the largest key in this symbol table that is smaller than or equal to
key
. - floor(Key) - Method in class dsa.RedBlackBinarySearchTreeST
- from() - Method in class dsa.DiEdge
-
Returns the tail vertex of this directed edge.
G
- Genome - Class in dsa
-
This library provides static methods for compressing and expanding a genomic sequence using a 2-bit code.
- Genome() - Constructor for class dsa.Genome
- get(int) - Method in class dsa.SparseVector
-
Returns the
i
th component of this vector. - get(int) - Method in class dsa.Vector
-
Returns the ith component of this vector.
- get(int, int) - Method in class dsa.SparseMatrix
-
Returns the entry in this matrix at row
i
and columnj
. - get(String) - Method in class dsa.TrieST
-
Returns the value associated with
key
in this symbol table, ornull
. - get(Key) - Method in interface dsa.BasicST
-
Returns the value associated with
key
in this symbol table, ornull
. - get(Key) - Method in class dsa.BinarySearchST
- get(Key) - Method in class dsa.BinarySearchTreeST
- get(Key) - Method in class dsa.LinearSearchST
- get(Key) - Method in interface dsa.OrderedST
-
Returns the value associated with
key
in this symbol table, ornull
. - get(Key) - Method in class dsa.RedBlackBinarySearchTreeST
- get(Key) - Method in class dsa.SeparateChainingHashST
- graph() - Method in class dsa.SymbolGraph
-
Returns the graph associated with this symbol graph.
- Graph - Class in dsa
-
A data type to represent an undirected graph.
- Graph(int) - Constructor for class dsa.Graph
-
Constructs an empty graph with
V
vertices and 0 edges. - Graph(In) - Constructor for class dsa.Graph
-
Constructs a graph from the input stream
in
.
H
- hasCycle() - Method in class dsa.DiCycle
-
Returns
true
if a directed cycle was detected, andfalse
otherwise. - hashCode() - Method in class dsa.Date
-
Returns a hash code for this date.
- hashCode() - Method in class dsa.Point2D
-
Returns a hash code for this point.
- hashCode() - Method in class dsa.RectHV
-
Returns a hash code for this rectangle.
- hashCode() - Method in class dsa.Transaction
-
Returns a hash code for this transaction.
- hasOrder() - Method in class dsa.Topological
-
Returns
true
if there exists a topological order, andfalse
otherwise. - hasPathTo(int) - Method in class dsa.BFSDiPaths
- hasPathTo(int) - Method in class dsa.BFSPaths
- hasPathTo(int) - Method in class dsa.DFSDiPaths
- hasPathTo(int) - Method in class dsa.DFSPaths
- hasPathTo(int) - Method in class dsa.Dijkstra
- hasPathTo(int) - Method in interface dsa.Paths
-
Returns
true
if there is a path between a designated source vertex and vertexv
, andfalse
otherwise. - Heap - Class in dsa
-
This library implements heap sort.
- Heap() - Constructor for class dsa.Heap
- height() - Method in class dsa.RectHV
-
Returns the height of this rectangle.
- HEXADECIMAL - Static variable in class dsa.Alphabet
-
The hexadecimal alphabet { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }.
- Huffman - Class in dsa
-
This data type provides static methods for compressing and expanding a binary input using Huffman codes over the 8-bit extended ASCII alphabet.
- Huffman() - Constructor for class dsa.Huffman
I
- increment() - Method in class dsa.Counter
-
Increments this counter by 1.
- inDegree(int) - Method in class dsa.DiGraph
-
Returns the in-degree of vertex
v
in this digraph. - inDegree(int) - Method in class dsa.EdgeWeightedDiGraph
-
Returns the in-degree of vertex
v
in this edge-weighted digraph. - IndexMaxPQ<Key extends Comparable<Key>> - Class in dsa
-
A data type to represent an indexed maximum priority queue (indexMaxPQ) data structure, implemented using a binary max-heap.
- IndexMaxPQ(int) - Constructor for class dsa.IndexMaxPQ
-
Constructs an empty indexMaxPQ with indices from the interval
[0, maxN)
. - IndexMinPQ<Key extends Comparable<Key>> - Class in dsa
-
A data type to represent an indexed minimum priority queue (indexMinPQ) data structure, implemented using a binary min-heap.
- IndexMinPQ(int) - Constructor for class dsa.IndexMinPQ
-
Constructs an empty indexMinPQ with indices from the interval
[0, maxN)
. - indexOf(double[], double) - Static method in class dsa.BinarySearch
-
Returns the index of
key
in the arraya
, or -1. - indexOf(double[], double) - Static method in class dsa.LinearSearch
-
Returns the index of
key
in the arraya
, or -1. - indexOf(int[], int) - Static method in class dsa.BinarySearch
-
Returns the index of
key
in the arraya
, or -1. - indexOf(int[], int) - Static method in class dsa.LinearSearch
-
Returns the index of
key
in the arraya
, or -1. - indexOf(Comparable[], Comparable) - Static method in class dsa.BinarySearch
-
Returns the index of
key
in the sorted arraya
, or -1. - indexOf(Object[], Object) - Static method in class dsa.LinearSearch
-
Returns the index of
key
in the arraya
, or -1. - indexOf(String) - Method in class dsa.SymbolDiGraph
-
Returns the integer associated with the vertex
s
in this symbol digraph. - indexOf(String) - Method in class dsa.SymbolGraph
-
Returns the integer associated with the vertex
s
in this symbol graph. - inOrder() - Method in class dsa.BinarySearchTreeST
-
Returns all the keys from this symbol table in in-order.
- insert(int, Key) - Method in class dsa.IndexMaxPQ
-
Associates
key
with indexi
in this indexMaxPQ. - insert(int, Key) - Method in class dsa.IndexMinPQ
-
Associates
key
with indexi
in this indexMinPQ. - insert(Key) - Method in class dsa.MaxPQ
-
Adds
key
to this maxPQ. - insert(Key) - Method in class dsa.MinPQ
-
Adds
key
to this minPQ. - Insertion - Class in dsa
-
This library implements insertion sort.
- Insertion() - Constructor for class dsa.Insertion
- intersects(RectHV) - Method in class dsa.RectHV
-
Returns
true
if this rectangle intersects with other, andfalse
otherwise. - Inversions - Class in dsa
-
This library to count the number of inversions in an array.
- Inversions() - Constructor for class dsa.Inversions
- isAfter(Date) - Method in class dsa.Date
-
Returns
true
if this date is afterother
, andfalse
otherwise. - isBefore(Date) - Method in class dsa.Date
-
Returns
true
if this date is beforeother
, andfalse
otherwise. - isEmpty() - Method in interface dsa.Bag
-
Returns
true
if this bag is empty, andfalse
otherwise. - isEmpty() - Method in interface dsa.BasicST
-
Returns
true
if this symbol table is empty, andfalse
otherwise. - isEmpty() - Method in class dsa.BinarySearchST
- isEmpty() - Method in class dsa.BinarySearchTreeST
- isEmpty() - Method in class dsa.IndexMaxPQ
-
Returns
true
if this indexMaxPQ empty, andfalse
otherwise. - isEmpty() - Method in class dsa.IndexMinPQ
-
Returns
true
if this indexMinPQ empty, andfalse
otherwise. - isEmpty() - Method in class dsa.LinearSearchST
- isEmpty() - Method in class dsa.LinkedBag
- isEmpty() - Method in class dsa.LinkedQueue
- isEmpty() - Method in class dsa.LinkedStack
- isEmpty() - Method in class dsa.MaxPQ
-
Returns
true
if this maxPQ empty, andfalse
otherwise. - isEmpty() - Method in class dsa.MinPQ
-
Returns
true
if this minPQ empty, andfalse
otherwise. - isEmpty() - Method in interface dsa.OrderedST
-
Returns
true
if this symbol table is empty, andfalse
otherwise. - isEmpty() - Method in interface dsa.Queue
-
Returns
true
if this queue is empty, andfalse
otherwise. - isEmpty() - Method in class dsa.RedBlackBinarySearchTreeST
- isEmpty() - Method in class dsa.ResizingArrayBag
- isEmpty() - Method in class dsa.ResizingArrayQueue
- isEmpty() - Method in class dsa.ResizingArrayStack
- isEmpty() - Method in class dsa.SeparateChainingHashST
- isEmpty() - Method in class dsa.Set
-
Returns
true
if this set is empty, andfalse
otherwise. - isEmpty() - Method in interface dsa.Stack
-
Returns
true
if this stack is empty, andfalse
otherwise. - isEmpty() - Method in class dsa.TrieST
-
Returns
true
if this symbol table is empty, andfalse
otherwise. - iterator() - Method in class dsa.IndexMaxPQ
-
Returns an iterator to iterate over the indices in this indexMaxPQ in descending order of the associated keys.
- iterator() - Method in class dsa.IndexMinPQ
-
Returns an iterator to iterate over the indices in this indexMinPQ in ascending order of the associated keys.
- iterator() - Method in class dsa.LinkedBag
-
Returns an iterator to iterate over the items in this bag.
- iterator() - Method in class dsa.LinkedQueue
-
Returns an iterator to iterate over the items in this queue in FIFO order.
- iterator() - Method in class dsa.LinkedStack
-
Returns an iterator to iterate over the items in this stack in LIFO order.
- iterator() - Method in class dsa.MaxPQ
-
Returns an iterator to iterate over the keys in this maxPQ in descending order.
- iterator() - Method in class dsa.MinPQ
-
Returns an iterator to iterate over the keys in this minPQ in ascending order.
- iterator() - Method in class dsa.ResizingArrayBag
-
Returns an iterator to iterate over the items in this bag.
- iterator() - Method in class dsa.ResizingArrayQueue
-
Returns an iterator to iterate over the items in this queue in FIFO order.
- iterator() - Method in class dsa.ResizingArrayStack
-
Returns an iterator to iterate over the items in this stack in LIFO order.
- iterator() - Method in class dsa.Set
-
Returns an iterator to iterate over the keys in this set in sorted order.
K
- keyOf(int) - Method in class dsa.IndexMaxPQ
-
Returns the key associated with index
i
in this indexMaxPQ. - keyOf(int) - Method in class dsa.IndexMinPQ
-
Returns the key associated with index
i
in this indexMinPQ. - keys() - Method in interface dsa.BasicST
-
Returns all the keys in this symbol table.
- keys() - Method in class dsa.BinarySearchST
- keys() - Method in class dsa.BinarySearchTreeST
- keys() - Method in class dsa.LinearSearchST
- keys() - Method in interface dsa.OrderedST
-
Returns all the keys in this symbol table in sorted order.
- keys() - Method in class dsa.RedBlackBinarySearchTreeST
- keys() - Method in class dsa.SeparateChainingHashST
- keys() - Method in class dsa.TrieST
-
Returns all the keys in this symbol table.
- keys(Key, Key) - Method in class dsa.BinarySearchST
- keys(Key, Key) - Method in class dsa.BinarySearchTreeST
- keys(Key, Key) - Method in interface dsa.OrderedST
-
Returns the keys in this symbol table that are in the interval
[lo, hi]
in sorted order. - keys(Key, Key) - Method in class dsa.RedBlackBinarySearchTreeST
- keysThatMatch(String) - Method in class dsa.TrieST
-
Returns all the keys in this symbol table that match
pattern
, where the.
symbol is treated as a wildcard character. - keysWithPrefix(String) - Method in class dsa.TrieST
-
Returns all the keys in this symbol table that start with
prefix
. - KMP - Class in dsa
-
A data type to find the first occurrence of a pattern string within a text string, using the Knuth-Morris-Pratt (KMP) substring search algorithm.
- KMP(String, int) - Constructor for class dsa.KMP
-
Preprocesses the
pattern
string with alphabet size given byradix
. - Kruskal - Class in dsa
-
An immutable data type to determine the minimum spanning tree (MST) of an edge-weighted graph.
- Kruskal(EdgeWeightedGraph) - Constructor for class dsa.Kruskal
-
Determines the MST of the edge-weighted graph
G
.
L
- lgRadix() - Method in class dsa.Alphabet
-
Returns the binary logarithm (rounded up) of this alphabet's radix.
- LinearSearch - Class in dsa
-
This library implements linear search.
- LinearSearch() - Constructor for class dsa.LinearSearch
- LinearSearchST<Key,Value> - Class in dsa
-
This data type provides an implementation of the basic symbol table (BasicST) API, using a linked-list as the underlying data structure.
- LinearSearchST() - Constructor for class dsa.LinearSearchST
-
Constructs an empty symbol table.
- LinkedBag<Item> - Class in dsa
-
This data type provides an implementation of the Bag API, using a linked-list as the underlying data structure.
- LinkedBag() - Constructor for class dsa.LinkedBag
-
Constructs an empty bag.
- LinkedQueue<Item> - Class in dsa
-
This data type provides an implementation of the Queue API, using a linked-list as the underlying data structure.
- LinkedQueue() - Constructor for class dsa.LinkedQueue
-
Constructs an empty queue.
- LinkedStack<Item> - Class in dsa
-
This data type provides an implementation of the Stack API, using a linked-list as the underlying data structure.
- LinkedStack() - Constructor for class dsa.LinkedStack
-
Constructs an empty stack.
- longestPrefixOf(String) - Method in class dsa.TrieST
-
Returns the string in this symbol table that is the longest prefix of
query
, ornull
. - LOWERCASE - Static variable in class dsa.Alphabet
-
The lowercase alphabet { a, b, c, ..., z }.
- LSD - Class in dsa
-
This library implements LSD radix sort.
- LSD() - Constructor for class dsa.LSD
M
- magnitude() - Method in class dsa.SparseVector
-
Returns the magnitude of this vector.
- magnitude() - Method in class dsa.Vector
-
Returns the magnitude of this vector.
- main(String[]) - Static method in class dsa.Alphabet
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.BFSDiPaths
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.BFSPaths
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.BinarySearch
-
Unit tests the library.
- main(String[]) - Static method in class dsa.BinarySearchST
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.BinarySearchTreeST
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Bubble
-
Unit tests the library.
- main(String[]) - Static method in class dsa.Counter
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Date
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.DFSDiPaths
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.DFSOrders
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.DFSPaths
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.DiCycle
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.DiEdge
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.DiGraph
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Dijkstra
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Edge
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.EdgeWeightedDiGraph
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.EdgeWeightedGraph
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Genome
-
Unit tests the library.
- main(String[]) - Static method in class dsa.Graph
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Heap
-
Unit tests the library.
- main(String[]) - Static method in class dsa.Huffman
-
Unit tests the library.
- main(String[]) - Static method in class dsa.IndexMaxPQ
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.IndexMinPQ
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Insertion
-
Unit tests the library.
- main(String[]) - Static method in class dsa.Inversions
-
Unit tests the library.
- main(String[]) - Static method in class dsa.KMP
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Kruskal
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.LinearSearch
-
Unit tests the library.
- main(String[]) - Static method in class dsa.LinearSearchST
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.LinkedBag
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.LinkedQueue
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.LinkedStack
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.LSD
-
Unit tests the library.
- main(String[]) - Static method in class dsa.MaxPQ
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Merge
-
Unit tests the library.
- main(String[]) - Static method in class dsa.MinPQ
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.MSD
-
Unit tests the library.
- main(String[]) - Static method in class dsa.NFA
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Point2D
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Quick
-
Unit tests the library.
- main(String[]) - Static method in class dsa.Quick3way
-
Unit tests the library.
- main(String[]) - Static method in class dsa.QuickFindUF
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.QuickUnionUF
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.RectHV
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.RedBlackBinarySearchTreeST
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.ResizingArrayBag
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.ResizingArrayQueue
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.ResizingArrayStack
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.RunLength
-
Unit tests the library.
- main(String[]) - Static method in class dsa.Selection
-
Unit tests the library.
- main(String[]) - Static method in class dsa.SeparateChainingHashST
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Set
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Shell
-
Unit tests the library.
- main(String[]) - Static method in class dsa.SparseMatrix
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.SparseVector
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.SymbolDiGraph
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.SymbolGraph
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Topological
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Transaction
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.TrieST
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.Vector
-
Unit tests the data type.
- main(String[]) - Static method in class dsa.WeightedQuickUnionUF
-
Unit tests the data type.
- max() - Method in class dsa.BinarySearchST
- max() - Method in class dsa.BinarySearchTreeST
- max() - Method in class dsa.MaxPQ
-
Returns the largest key in this maxPQ.
- max() - Method in interface dsa.OrderedST
-
Returns the largest key in this symbol table.
- max() - Method in class dsa.RedBlackBinarySearchTreeST
- maxIndex() - Method in class dsa.IndexMaxPQ
-
Returns the index associated with the largest key in this indexMaxPQ.
- maxKey() - Method in class dsa.IndexMaxPQ
-
Returns the largest key in this indexMaxPQ.
- MaxPQ<Key> - Class in dsa
-
A data type to represent a maximum priority queue (maxPQ) data structure, implemented using a binary max-heap.
- MaxPQ() - Constructor for class dsa.MaxPQ
-
Constructs an empty maxPQ.
- MaxPQ(int) - Constructor for class dsa.MaxPQ
-
Constructs an empty maxPQ with the given capacity.
- MaxPQ(int, Comparator<Key>) - Constructor for class dsa.MaxPQ
-
Constructs an empty maxPQ with the given capacity and comparator.
- MaxPQ(Comparator<Key>) - Constructor for class dsa.MaxPQ
-
Construct an empty maxPQ with the given comparator.
- Merge - Class in dsa
-
This library implements merge sort.
- Merge() - Constructor for class dsa.Merge
- min() - Method in class dsa.BinarySearchST
- min() - Method in class dsa.BinarySearchTreeST
- min() - Method in class dsa.MinPQ
-
Returns the smallest key in this minPQ.
- min() - Method in interface dsa.OrderedST
-
Returns the smallest key in this symbol table.
- min() - Method in class dsa.RedBlackBinarySearchTreeST
- minIndex() - Method in class dsa.IndexMinPQ
-
Returns the index associated with the smallest key in this indexMinPQ.
- minKey() - Method in class dsa.IndexMinPQ
-
Returns the smallest key in this indexMinPQ.
- MinPQ<Key> - Class in dsa
-
A data type to represent a minimum priority queue (minPQ) data structure, implemented using a binary min-heap.
- MinPQ() - Constructor for class dsa.MinPQ
-
Constructs an empty minPQ.
- MinPQ(int) - Constructor for class dsa.MinPQ
-
Constructs an empty minPQ with the given capacity.
- MinPQ(int, Comparator<Key>) - Constructor for class dsa.MinPQ
-
Constructs an empty minPQ with the given capacity and comparator.
- MinPQ(Comparator<Key>) - Constructor for class dsa.MinPQ
-
Construct an empty minPQ with the given comparator.
- month() - Method in class dsa.Date
-
Returns the month (an integer between 1 and 12).
- MSD - Class in dsa
-
This library implements MSD radix sort.
- MSD() - Constructor for class dsa.MSD
N
- name() - Method in class dsa.Transaction
-
Returns the name of the person involved in this transaction.
- nameOf(int) - Method in class dsa.SymbolDiGraph
-
Returns the name of the vertex associated with the integer
v
in this symbol digraph. - nameOf(int) - Method in class dsa.SymbolGraph
-
Returns the name of the vertex associated with the integer
v
in this symbol graph. - nameOrder() - Static method in class dsa.Transaction
-
Returns a comparator for comparing two transactions by name.
- nCols() - Method in class dsa.SparseMatrix
-
Returns the number of columns in this matrix.
- next() - Method in class dsa.Date
-
Returns the next date in the calendar.
- NFA - Class in dsa
-
A a data type for creating a nondeterministic finite state automaton (NFA) from a regular expression and testing whether a given string is matched by that regular expression.
- NFA(String) - Constructor for class dsa.NFA
-
Constructs a nondeterministic finite state automaton (NFA) from
regexp
. - nRows() - Method in class dsa.SparseMatrix
-
Returns the number of rows in this matrix.
O
- OCTAL - Static variable in class dsa.Alphabet
-
The octal alphabet { 0, 1, 2, 3, 4, 5, 6, 7 }.
- order() - Method in class dsa.Topological
-
Returns a topological order, or
null
. - OrderedST<Key extends Comparable<Key>,Value> - Interface in dsa
-
This interface specifies the API for the ordered symbol table data structure.
- other(int) - Method in class dsa.Edge
-
Returns the endpoint of this edge that is different from vertex
v
. - outDegree(int) - Method in class dsa.DiGraph
-
Returns the out-degree of vertex
v
in this digraph. - outDegree(int) - Method in class dsa.EdgeWeightedDiGraph
-
Returns the out-degree of vertex
v
in this edge-weighted digraph.
P
- Paths - Interface in dsa
-
This interface specifies the API for computing single-source paths in a graph.
- pathTo(int) - Method in class dsa.BFSDiPaths
- pathTo(int) - Method in class dsa.BFSPaths
- pathTo(int) - Method in class dsa.DFSDiPaths
- pathTo(int) - Method in class dsa.DFSPaths
- pathTo(int) - Method in class dsa.Dijkstra
- pathTo(int) - Method in interface dsa.Paths
-
Returns a path between a designated source vertex and vertex
v
, ornull
. - peek() - Method in class dsa.LinkedQueue
- peek() - Method in class dsa.LinkedStack
- peek() - Method in interface dsa.Queue
-
Returns the item at the front of this queue.
- peek() - Method in class dsa.ResizingArrayQueue
- peek() - Method in class dsa.ResizingArrayStack
- peek() - Method in interface dsa.Stack
-
Returns the item at the top of this stack.
- plus(SparseMatrix) - Method in class dsa.SparseMatrix
-
Returns the sum of this matrix and
other
. - plus(SparseVector) - Method in class dsa.SparseVector
-
Returns the sum of this vector and
other
. - Point2D - Class in dsa
-
An immutable data type to represent a 2d point with real-valued coordinates.
- Point2D(double, double) - Constructor for class dsa.Point2D
-
Constructs a point
(x, y)
. - polarOrder() - Method in class dsa.Point2D
-
Returns a comparator for comparing two points by the polar angle (0 to 2pi) they make with this point.
- pop() - Method in class dsa.LinkedStack
- pop() - Method in class dsa.ResizingArrayStack
- pop() - Method in interface dsa.Stack
-
Removes and returns the item at the top of this stack.
- post() - Method in class dsa.DFSOrders
-
Returns the vertices in post-order.
- post(int) - Method in class dsa.DFSOrders
-
Returns the post-order number of vertex v.
- postOrder() - Method in class dsa.BinarySearchTreeST
-
Returns all the keys from this symbol table in post-order.
- pre() - Method in class dsa.DFSOrders
-
Returns the vertices in pre-order.
- pre(int) - Method in class dsa.DFSOrders
-
Returns the pre-order number of vertex v.
- preOrder() - Method in class dsa.BinarySearchTreeST
-
Returns all the keys from this symbol table in pre-order.
- PROTEIN - Static variable in class dsa.Alphabet
-
The protein alphabet { A, C, D, E, F, G, H, I, K, L, M, N, P, Q, R, S, T, V, W, Y }.
- push(Item) - Method in class dsa.LinkedStack
- push(Item) - Method in class dsa.ResizingArrayStack
- push(Item) - Method in interface dsa.Stack
-
Adds
item
to the top of this stack. - put(int, double) - Method in class dsa.SparseVector
-
Sets the
i
th component of this vector tovalue
. - put(int, int, double) - Method in class dsa.SparseMatrix
-
Sets the entry at row
i
and columnj
in this matrix tovalue
. - put(String, Value) - Method in class dsa.TrieST
-
Inserts the
key
andvalue
pair into this symbol table. - put(Key, Value) - Method in interface dsa.BasicST
-
Inserts the
key
andvalue
pair into this symbol table. - put(Key, Value) - Method in class dsa.BinarySearchST
- put(Key, Value) - Method in class dsa.BinarySearchTreeST
- put(Key, Value) - Method in class dsa.LinearSearchST
- put(Key, Value) - Method in interface dsa.OrderedST
-
Inserts the
key
andvalue
pair into this symbol table. - put(Key, Value) - Method in class dsa.RedBlackBinarySearchTreeST
- put(Key, Value) - Method in class dsa.SeparateChainingHashST
Q
- Queue<Item> - Interface in dsa
-
This interface specifies the API for the queue data structure.
- Quick - Class in dsa
-
This library implements quick sort.
- Quick() - Constructor for class dsa.Quick
- Quick3way - Class in dsa
-
This library implements quick-3-way sort.
- Quick3way() - Constructor for class dsa.Quick3way
- QuickFindUF - Class in dsa
-
This data type provides an implementation of the UF API in which the find operation is efficient (runs in constant time).
- QuickFindUF(int) - Constructor for class dsa.QuickFindUF
-
Constructs an empty union-find data structure with n sites.
- QuickUnionUF - Class in dsa
-
This data type provides an implementation of the UF API in which the find and union operations are efficient (run in logarithmic time) in the average case.
- QuickUnionUF(int) - Constructor for class dsa.QuickUnionUF
-
Constructs an empty union-find data structure with n sites.
R
- r() - Method in class dsa.Point2D
-
Returns the polar radius of this point.
- radix() - Method in class dsa.Alphabet
-
Returns the radix of this alphabet, ie, the number of characters in it.
- rank(Key) - Method in class dsa.BinarySearchST
- rank(Key) - Method in class dsa.BinarySearchTreeST
- rank(Key) - Method in interface dsa.OrderedST
-
Returns the number of keys in this symbol table that are strictly smaller than
key
. - rank(Key) - Method in class dsa.RedBlackBinarySearchTreeST
- recognizes(String) - Method in class dsa.NFA
-
Returns
true
if this NFA recognizestext
, andfalse
otherwise. - RectHV - Class in dsa
-
An immutable data type to represent a 2d axis-aligned rectangle with real-valued coordinates.
- RectHV(double, double, double, double) - Constructor for class dsa.RectHV
-
Constructs a rectangle
[xMin, yMin] x [xMax, yMax]
. - RedBlackBinarySearchTreeST<Key extends Comparable<Key>,Value> - Class in dsa
-
This data type provides an implementation of the ordered symbol table (OrderedST) API, using a red-black binary search tree (RBBST) as the underlying data structure.
- RedBlackBinarySearchTreeST() - Constructor for class dsa.RedBlackBinarySearchTreeST
-
Constructs an empty symbol table.
- reset() - Method in class dsa.Counter
-
Resets this counter to zero.
- ResizingArrayBag<Item> - Class in dsa
-
This data type provides an implementation of the Bag API, using an array as the underlying data structure.
- ResizingArrayBag() - Constructor for class dsa.ResizingArrayBag
-
Constructs an empty bag.
- ResizingArrayQueue<Item> - Class in dsa
-
This data type provides an implementation of the Queue API, using an array as the underlying data structure.
- ResizingArrayQueue() - Constructor for class dsa.ResizingArrayQueue
-
Constructs an empty queue.
- ResizingArrayStack<Item> - Class in dsa
-
This data type provides an implementation of the Stack API, using an array as the underlying data structure.
- ResizingArrayStack() - Constructor for class dsa.ResizingArrayStack
-
Constructs an empty stack.
- reversePost() - Method in class dsa.DFSOrders
-
Returns the vertices in reverse post-order.
- rOrder() - Static method in class dsa.Point2D
-
Returns a comparator for comparing two points by their polar radius.
- RunLength - Class in dsa
-
This library provides static methods for compressing and expanding a binary input using run-length encoding with 8-bit run lengths.
- RunLength() - Constructor for class dsa.RunLength
S
- scale(double) - Method in class dsa.SparseVector
-
Returns the scalar-vector product of this vector and
alpha
. - scale(double) - Method in class dsa.Vector
-
Returns a scaled (by factor
other
) copy of this vector. - search(String) - Method in class dsa.KMP
-
Returns the index of the first occurrence of the pattern string within the
text
string, or the length of the text string. - select(int) - Method in class dsa.BinarySearchST
- select(int) - Method in class dsa.BinarySearchTreeST
- select(int) - Method in interface dsa.OrderedST
-
Returns the key in this symbol table with the rank
k
. - select(int) - Method in class dsa.RedBlackBinarySearchTreeST
- Selection - Class in dsa
-
This library implements selection sort.
- Selection() - Constructor for class dsa.Selection
- SeparateChainingHashST<Key,Value> - Class in dsa
-
This data type provides an implementation of the basic symbol table (BasicST) API, using an array (hash table) of LinearSearchST objects (chains) as the underlying data structure.
- SeparateChainingHashST() - Constructor for class dsa.SeparateChainingHashST
-
Constructs an empty symbol table.
- SeparateChainingHashST(int) - Constructor for class dsa.SeparateChainingHashST
-
Constructs an empty symbol table with m chains.
- Set<Key extends Comparable<Key>> - Class in dsa
-
An iterable data type to represent an ordered set.
- Set() - Constructor for class dsa.Set
-
Constructs an empty set.
- Shell - Class in dsa
-
This library implements shell sort.
- Shell() - Constructor for class dsa.Shell
- size() - Method in interface dsa.Bag
-
Returns the number of items in this bag.
- size() - Method in interface dsa.BasicST
-
Returns the number of key-value pairs in this symbol table.
- size() - Method in class dsa.BinarySearchST
- size() - Method in class dsa.BinarySearchTreeST
- size() - Method in class dsa.IndexMaxPQ
-
Returns the number of keys in this indexMaxPQ.
- size() - Method in class dsa.IndexMinPQ
-
Returns the number of keys in this indexMinPQ.
- size() - Method in class dsa.LinearSearchST
- size() - Method in class dsa.LinkedBag
- size() - Method in class dsa.LinkedQueue
- size() - Method in class dsa.LinkedStack
- size() - Method in class dsa.MaxPQ
-
Returns the number of keys in this maxPQ.
- size() - Method in class dsa.MinPQ
-
Returns the number of keys in this minPQ.
- size() - Method in interface dsa.OrderedST
-
Returns the number of key-value pairs in this symbol table.
- size() - Method in interface dsa.Queue
-
Returns the number of items in this queue.
- size() - Method in class dsa.RedBlackBinarySearchTreeST
- size() - Method in class dsa.ResizingArrayBag
- size() - Method in class dsa.ResizingArrayQueue
- size() - Method in class dsa.ResizingArrayStack
- size() - Method in class dsa.SeparateChainingHashST
- size() - Method in class dsa.Set
-
Returns the number of keys in this set.
- size() - Method in class dsa.SparseMatrix
-
Returns the number of nonzero entries in this matrix.
- size() - Method in class dsa.SparseVector
-
Returns the number of nonzero entries in this vector.
- size() - Method in interface dsa.Stack
-
Returns the number of items in this stack.
- size() - Method in class dsa.TrieST
-
Returns the number of key-value pairs in this symbol table.
- size(Key, Key) - Method in class dsa.BinarySearchST
- size(Key, Key) - Method in class dsa.BinarySearchTreeST
- size(Key, Key) - Method in interface dsa.OrderedST
-
Returns the number of keys in this symbol table that are in the interval
[lo, hi]
. - size(Key, Key) - Method in class dsa.RedBlackBinarySearchTreeST
- sort(double[]) - Static method in class dsa.Bubble
-
Sorts the array
a
. - sort(double[]) - Static method in class dsa.Heap
-
Sorts the array
a
. - sort(double[]) - Static method in class dsa.Insertion
-
Sorts the array
a
. - sort(double[]) - Static method in class dsa.Merge
-
Sorts the array
a
. - sort(double[]) - Static method in class dsa.Quick
-
Sorts the array
a
. - sort(double[]) - Static method in class dsa.Quick3way
-
Sorts the array
a
. - sort(double[]) - Static method in class dsa.Selection
-
Sorts the array
a
. - sort(double[]) - Static method in class dsa.Shell
-
Sorts the array
a
. - sort(int[]) - Static method in class dsa.Bubble
-
Sorts the array
a
. - sort(int[]) - Static method in class dsa.Heap
-
Sorts the array
a
. - sort(int[]) - Static method in class dsa.Insertion
-
Sorts the array
a
. - sort(int[]) - Static method in class dsa.Merge
-
Sorts the array
a
. - sort(int[]) - Static method in class dsa.Quick
-
Sorts the array
a
. - sort(int[]) - Static method in class dsa.Quick3way
-
Sorts the array
a
. - sort(int[]) - Static method in class dsa.Selection
-
Sorts the array
a
. - sort(int[]) - Static method in class dsa.Shell
-
Sorts the array
a
. - sort(Comparable[]) - Static method in class dsa.Bubble
-
Sorts the array
a
according to the natural order of its objects. - sort(Comparable[]) - Static method in class dsa.Heap
-
Sorts the array
a
according to the natural order of its objects. - sort(Comparable[]) - Static method in class dsa.Insertion
-
Sorts the array
a
according to the natural order of its objects. - sort(Comparable[]) - Static method in class dsa.Merge
-
Sorts the array
a
according to the natural order of its objects. - sort(Comparable[]) - Static method in class dsa.Quick
-
Sorts the array
a
according to the natural order of its objects. - sort(Comparable[]) - Static method in class dsa.Quick3way
-
Sorts the array
a
according to the natural order of its objects. - sort(Comparable[]) - Static method in class dsa.Selection
-
Sorts the array
a
according to the natural order of its objects. - sort(Comparable[]) - Static method in class dsa.Shell
-
Sorts the array
a
according to the natural order of its objects. - sort(Object[], Comparator) - Static method in class dsa.Bubble
-
Sorts the array
a
according to the order induced by the comparatorc
. - sort(Object[], Comparator) - Static method in class dsa.Heap
-
Sorts the array
a
according to the order induced by the comparatorc
. - sort(Object[], Comparator) - Static method in class dsa.Insertion
-
Sorts the array
a
according to the order induced by the comparatora
. - sort(Object[], Comparator) - Static method in class dsa.Merge
-
Sorts the array
a
according to the order induced by the comparatorc
. - sort(Object[], Comparator) - Static method in class dsa.Quick
-
Sorts the array
a
according to the order induced by the comparatorc
. - sort(Object[], Comparator) - Static method in class dsa.Quick3way
-
Sorts the array
a
according to the order induced by the comparatorc
. - sort(Object[], Comparator) - Static method in class dsa.Selection
-
Sorts the array
a
according to the order induced by the comparatorc
. - sort(Object[], Comparator) - Static method in class dsa.Shell
-
Sorts the array
a
according to the order induced by the comparatorc
. - sort(String[]) - Static method in class dsa.LSD
-
Sorts the array
a
of fixed-length strings over the extended ASCII alphabet. - sort(String[]) - Static method in class dsa.MSD
-
Sorts the array
a
of strings over the extended ASCII alphabet. - SparseMatrix - Class in dsa
-
A data type to represent an
m x n
sparse matrix. - SparseMatrix(int, int) - Constructor for class dsa.SparseMatrix
-
Constructs an
m x n
dimensional zero matrix. - SparseVector - Class in dsa
-
A data type to represent an
n
-dimensional, real-valued sparse vector. - SparseVector(int) - Constructor for class dsa.SparseVector
-
Constructs an
n
-dimensional zero vector. - Stack<Item> - Interface in dsa
-
This interface specifies the API for the stack data structure.
- subtract(Vector) - Method in class dsa.Vector
-
Returns the difference of this vector and
other
. - SymbolDiGraph - Class in dsa
-
An immutable data type to represent a directed symbol graph.
- SymbolDiGraph(In, String) - Constructor for class dsa.SymbolDiGraph
-
Constructs a symbol digraph from the input stream
in
usingdelim
as the delimiter. - SymbolGraph - Class in dsa
-
An immutable data type to represent an undirected symbol graph.
- SymbolGraph(In, String) - Constructor for class dsa.SymbolGraph
-
Constructs a symbol graph from the input stream
in
and usingdelim
as the delimiter.
T
- tally() - Method in class dsa.Counter
-
Returns the current value of this counter.
- theta() - Method in class dsa.Point2D
-
Returns the polar angle (-pi to pi) of this point.
- times(SparseVector) - Method in class dsa.SparseMatrix
-
Returns the product of this matrix and the vector
x
. - to() - Method in class dsa.DiEdge
-
Returns the head vertex of this directed edge.
- toChar(int) - Method in class dsa.Alphabet
-
Returns the character with the given index.
- toChars(int[]) - Method in class dsa.Alphabet
-
Returns the characters with the given indices.
- toIndex(char) - Method in class dsa.Alphabet
-
Returns the index of
c
. - toIndices(String) - Method in class dsa.Alphabet
-
Returns the indices of the characters in
s
. - Topological - Class in dsa
-
An immutable data type to determine whether a digraph has a topological order and, if so, find such an order.
- Topological(DiGraph) - Constructor for class dsa.Topological
-
Determines whether the digraph
G
has a topological order and, if so, finds such an order. - toString() - Method in class dsa.BinarySearchST
-
Returns a string representation of this symbol table.
- toString() - Method in class dsa.BinarySearchTreeST
-
Returns a string representation of this symbol table.
- toString() - Method in class dsa.Counter
-
Returns a string representation of this counter.
- toString() - Method in class dsa.Date
-
Returns a string representation of this date.
- toString() - Method in class dsa.DiEdge
-
Returns a string representation of this directed edge.
- toString() - Method in class dsa.DiGraph
-
Returns a string representation of this digraph.
- toString() - Method in class dsa.Edge
-
Returns a string representation of this edge.
- toString() - Method in class dsa.EdgeWeightedDiGraph
-
Returns a string representation of this edge-weighted digraph.
- toString() - Method in class dsa.EdgeWeightedGraph
-
Returns a string representation of this edge-weighted graph.
- toString() - Method in class dsa.Graph
-
Returns a string representation of this graph.
- toString() - Method in class dsa.IndexMaxPQ
-
Returns a string representation of this indexMaxPQ.
- toString() - Method in class dsa.IndexMinPQ
-
Returns a string representation of this indexMinPQ.
- toString() - Method in class dsa.LinearSearchST
-
Returns a string representation of this symbol table.
- toString() - Method in class dsa.LinkedBag
-
Returns a string representation of this bag.
- toString() - Method in class dsa.LinkedQueue
-
Returns a string representation of this queue.
- toString() - Method in class dsa.LinkedStack
-
Returns a string representation of this stack.
- toString() - Method in class dsa.MaxPQ
-
Returns a string representation of this minPQ.
- toString() - Method in class dsa.MinPQ
-
Returns a string representation of this minPQ.
- toString() - Method in class dsa.Point2D
-
Returns a string representation of this point.
- toString() - Method in class dsa.RectHV
-
Returns a string representation of this rectangle.
- toString() - Method in class dsa.RedBlackBinarySearchTreeST
-
Returns a string representation of this symbol table.
- toString() - Method in class dsa.ResizingArrayBag
-
Returns a string representation of this bag.
- toString() - Method in class dsa.ResizingArrayQueue
-
Returns a string representation of this queue.
- toString() - Method in class dsa.ResizingArrayStack
-
Returns a string representation of this stack.
- toString() - Method in class dsa.SeparateChainingHashST
-
Returns a string representation of this symbol table.
- toString() - Method in class dsa.Set
-
Returns a string representation of this set.
- toString() - Method in class dsa.SparseMatrix
-
Returns a string representation of this matrix.
- toString() - Method in class dsa.SparseVector
-
Returns a string representation of this vector.
- toString() - Method in class dsa.SymbolDiGraph
-
Returns a string representation of this symbol digraph.
- toString() - Method in class dsa.SymbolGraph
-
Returns a string representation of this symbol graph.
- toString() - Method in class dsa.Transaction
-
Returns a string representation of this transaction.
- toString() - Method in class dsa.TrieST
-
Returns a string representation of this symbol table.
- toString() - Method in class dsa.Vector
-
Returns a string representation of this vector.
- Transaction - Class in dsa
-
An immutable data type to represent a commercial transaction with a name, date, and amount.
- Transaction(String) - Constructor for class dsa.Transaction
-
Constructs a transaction from a string
s
of the form"name date amount"
. - Transaction(String, Date, double) - Constructor for class dsa.Transaction
-
Constructs a transaction from a
name
,date
, andamount
. - TrieST<Value> - Class in dsa
-
A data type to represent the trie data structure, which is a symbol table with with string keys.
- TrieST() - Constructor for class dsa.TrieST
-
Constructs an empty symbol table.
U
- UF - Interface in dsa
-
This interface specifies the API for the union-find data structure.
- UNICODE16 - Static variable in class dsa.Alphabet
-
The Unicode 16 alphabet (0-65,535).
- union(int, int) - Method in class dsa.QuickFindUF
- union(int, int) - Method in class dsa.QuickUnionUF
- union(int, int) - Method in interface dsa.UF
-
Connects sites
p
andq
if they are not already connected. - union(int, int) - Method in class dsa.WeightedQuickUnionUF
- UPPERCASE - Static variable in class dsa.Alphabet
-
The uppercase alphabet { A, B, C, ..., Z }.
V
- V() - Method in class dsa.DiGraph
-
Returns the number of vertices in this digraph.
- V() - Method in class dsa.EdgeWeightedDiGraph
-
Returns the number of vertices in this edge-weighted digraph.
- V() - Method in class dsa.EdgeWeightedGraph
-
Returns the number of vertices in this edge-weighted graph.
- V() - Method in class dsa.Graph
-
Returns the number of vertices in this graph.
- Vector - Class in dsa
-
An immutable data type to represent an n-dimensional vector.
- Vector(double[]) - Constructor for class dsa.Vector
-
Constructs a vector given its components.
W
- weight() - Method in class dsa.DiEdge
-
Returns the weight of this directed edge.
- weight() - Method in class dsa.Edge
-
Returns the weight of this edge.
- weight() - Method in class dsa.Kruskal
-
Returns the sum of the edge weights in the MST.
- WeightedQuickUnionUF - Class in dsa
-
This data type provides an implementation of the UF API in which the find and union operations run in logarithmic time.
- WeightedQuickUnionUF(int) - Constructor for class dsa.WeightedQuickUnionUF
-
Constructs an empty union-find data structure with n sites.
- width() - Method in class dsa.RectHV
-
Returns the width of this rectangle.
X
- x() - Method in class dsa.Point2D
-
Returns the x-coordinate of this point.
- xMax() - Method in class dsa.RectHV
-
Returns the maximum x-coordinate of any point in this rectangle.
- xMin() - Method in class dsa.RectHV
-
Returns the minimum x-coordinate of any point in this rectangle.
- xOrder() - Static method in class dsa.Point2D
-
Returns a comparator for comparing two points by their x-coordinate.
Y
- y() - Method in class dsa.Point2D
-
Returns the y-coordinate of this point.
- year() - Method in class dsa.Date
-
Returns the year.
- yMax() - Method in class dsa.RectHV
-
Returns the maximum y-coordinate of any point in this rectangle.
- yMin() - Method in class dsa.RectHV
-
Returns the minimum y-coordinate of any point in this rectangle.
- yOrder() - Static method in class dsa.Point2D
-
Returns a comparator for comparing two points by their y-coordinate.
All Classes All Packages