- abs() - Method in class edu.princeton.cs.algorithms.Complex
-
- AcyclicLP - Class in edu.princeton.cs.algorithms
-
The AcyclicLP class represents a data type for solving the
single-source longest paths problem in edge-weighted directed
acyclic graphs (DAGs).
- AcyclicLP(EdgeWeightedDigraph, int) - Constructor for class edu.princeton.cs.algorithms.AcyclicLP
-
Computes a longest paths tree from s to every other vertex in
the directed acyclic graph G.
- AcyclicSP - Class in edu.princeton.cs.algorithms
-
The AcyclicSP class represents a data type for solving the
single-source shortest paths problem in edge-weighted directed acyclic
graphs (DAGs).
- AcyclicSP(EdgeWeightedDigraph, int) - Constructor for class edu.princeton.cs.algorithms.AcyclicSP
-
Computes a shortest paths tree from s to every other vertex in
the directed acyclic graph G.
- add(Item) - Method in class edu.princeton.cs.algorithms.Bag
-
Adds the item to this bag.
- add(Item) - Method in class edu.princeton.cs.algorithms.LinkedBag
-
Adds the item to this bag.
- add(Item) - Method in class edu.princeton.cs.algorithms.ResizingArrayBag
-
Adds the item to this bag.
- add(Key) - Method in class edu.princeton.cs.algorithms.SET
-
Adds the key to the set if it is not already present.
- add(String) - Method in class edu.princeton.cs.algorithms.TrieSET
-
Adds the key to the set if it is not already present.
- addEdge(DirectedEdge) - Method in class edu.princeton.cs.algorithms.AdjMatrixEdgeWeightedDigraph
-
Adds the directed edge e to the edge-weighted digraph (if there
is not already an edge with the same endpoints).
- addEdge(int, int) - Method in class edu.princeton.cs.algorithms.Digraph
-
Adds the directed edge v->w to the digraph.
- addEdge(DirectedEdge) - Method in class edu.princeton.cs.algorithms.EdgeWeightedDigraph
-
Adds the directed edge e to the edge-weighted digraph.
- addEdge(Edge) - Method in class edu.princeton.cs.algorithms.EdgeWeightedGraph
-
Adds the undirected edge e to the edge-weighted graph.
- addEdge(FlowEdge) - Method in class edu.princeton.cs.algorithms.FlowNetwork
-
Adds the edge e to the network.
- addEdge(int, int) - Method in class edu.princeton.cs.algorithms.Graph
-
Adds the undirected edge v-w to the graph.
- addResidualFlowTo(int, double) - Method in class edu.princeton.cs.algorithms.FlowEdge
-
Increases the flow on the edge in the direction to the given vertex.
- adj(int) - Method in class edu.princeton.cs.algorithms.AdjMatrixEdgeWeightedDigraph
-
Returns the directed edges incident from vertex v.
- adj(int) - Method in class edu.princeton.cs.algorithms.Digraph
-
Returns the vertices adjacent from vertex v in the digraph.
- adj(int) - Method in class edu.princeton.cs.algorithms.EdgeWeightedDigraph
-
Returns the directed edges incident from vertex v.
- adj(int) - Method in class edu.princeton.cs.algorithms.EdgeWeightedGraph
-
Returns the edges incident on vertex v.
- adj(int) - Method in class edu.princeton.cs.algorithms.FlowNetwork
-
Returns the edges incident on vertex v (includes both edges pointing to
and from v).
- adj(int) - Method in class edu.princeton.cs.algorithms.Graph
-
Returns the vertices adjacent to vertex v.
- AdjMatrixEdgeWeightedDigraph - Class in edu.princeton.cs.algorithms
-
The
AdjMatrixEdgeWeightedDigraph class represents a edge-weighted
digraph of vertices named 0 through
V - 1, where each
directed edge is of type
DirectedEdge and has a real-valued weight.
- AdjMatrixEdgeWeightedDigraph(int) - Constructor for class edu.princeton.cs.algorithms.AdjMatrixEdgeWeightedDigraph
-
Initializes an empty edge-weighted digraph with V vertices and 0 edges.
- AdjMatrixEdgeWeightedDigraph(int, int) - Constructor for class edu.princeton.cs.algorithms.AdjMatrixEdgeWeightedDigraph
-
Initializes a random edge-weighted digraph with V vertices and E edges.
- Alphabet - Class in edu.princeton.cs.algorithms
-
Compilation: javac Alphabet.java
Execution: java Alphabet
A data type for alphabets, for use with string-processing code
that must convert between an alphabet of size R and the integers
0 through R-1.
- Alphabet(String) - Constructor for class edu.princeton.cs.algorithms.Alphabet
-
- Alphabet() - Constructor for class edu.princeton.cs.algorithms.Alphabet
-
- amount() - Method in class edu.princeton.cs.algorithms.Transaction
-
Returns the amount of the transaction.
- Arbitrage - Class in edu.princeton.cs.algorithms
-
The Arbitrage class provides a client that finds an arbitrage
opportunity in a currency exchange table by constructing a
complete-digraph representation of the exchange table and then finding
a negative cycle in the digraph.
- area() - Method in class edu.princeton.cs.algorithms.Interval2D
-
Returns the area of this two-dimensional interval.
- area2(Point2D, Point2D, Point2D) - Static method in class edu.princeton.cs.algorithms.Point2D
-
Returns twice the signed area of the triangle a-b-c.
- areConnected(int, int) - Method in class edu.princeton.cs.algorithms.CC
-
Are vertices v and w in the same connected component?
- ASCII - Static variable in class edu.princeton.cs.algorithms.Alphabet
-
- AssignmentProblem - Class in edu.princeton.cs.algorithms
-
Compilation: javac AssignmentProblem.java
Execution: java AssignmentProblem N
Dependencies: DijkstraSP.java DirectedEdge.java
Solve an N-by-N assignment problem in N^3 log N time using the
successive shortest path algorithm.
- AssignmentProblem(double[][]) - Constructor for class edu.princeton.cs.algorithms.AssignmentProblem
-
- ATAN2_ORDER - Variable in class edu.princeton.cs.algorithms.Point2D
-
Compares two points by atan2() angle (between -pi and pi) with respect to this point.
- Average - Class in edu.princeton.cs.algorithms
-
The Average class provides a client for reading in a sequence
of real numbers and printing out their average.
- capacity() - Method in class edu.princeton.cs.algorithms.FlowEdge
-
Returns the capacity of the edge.
- cartesian(int) - Method in class edu.princeton.cs.algorithms.Vector
-
Returns the ith cartesian coordinate.
- Cat - Class in edu.princeton.cs.algorithms
-
The Cat class provides a client for concatenating the results
of several text files.
- CC - Class in edu.princeton.cs.algorithms
-
The CC class represents a data type for
determining the connected components in an undirected graph.
- CC(Graph) - Constructor for class edu.princeton.cs.algorithms.CC
-
Computes the connected components of the undirected graph G.
- cconvolve(Complex[], Complex[]) - Static method in class edu.princeton.cs.algorithms.FFT
-
- ccw(Point2D, Point2D, Point2D) - Static method in class edu.princeton.cs.algorithms.Point2D
-
Is a->b->c a counterclockwise turn?
- ceiling(Key) - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- ceiling(Key) - Method in class edu.princeton.cs.algorithms.BST
-
- ceiling(Key) - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
- ceiling(Key) - Method in class edu.princeton.cs.algorithms.SET
-
Returns the smallest key in the set greater than or equal to key.
- ceiling(Key) - Method in class edu.princeton.cs.algorithms.ST
-
Returns the smallest key in the symbol table greater than or equal to key.
- change(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Deprecated.
Replaced by changeKey()
- change(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Deprecated.
Replaced by changeKey()
- changeKey(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Change the key associated with index i to the specified value.
- changeKey(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Change the key associated with index i to the specified value.
- ClosestPair - Class in edu.princeton.cs.algorithms
-
- ClosestPair(Point2D[]) - Constructor for class edu.princeton.cs.algorithms.ClosestPair
-
- CollisionSystem - Class in edu.princeton.cs.algorithms
-
- CollisionSystem(Particle[]) - Constructor for class edu.princeton.cs.algorithms.CollisionSystem
-
- color(int) - Method in class edu.princeton.cs.algorithms.Bipartite
-
Returns the side of the bipartite that vertex v is on.
- compare(Transaction, Transaction) - Method in class edu.princeton.cs.algorithms.Transaction.HowMuchOrder
-
- compare(Transaction, Transaction) - Method in class edu.princeton.cs.algorithms.Transaction.WhenOrder
-
- compare(Transaction, Transaction) - Method in class edu.princeton.cs.algorithms.Transaction.WhoOrder
-
- compareTo(Counter) - Method in class edu.princeton.cs.algorithms.Counter
-
Compares this counter to that counter.
- compareTo(Date) - Method in class edu.princeton.cs.algorithms.Date
-
Compare this date to that date.
- compareTo(Edge) - Method in class edu.princeton.cs.algorithms.Edge
-
Compares two edges by weight.
- compareTo(Point2D) - Method in class edu.princeton.cs.algorithms.Point2D
-
Compares this point to that point by y-coordinate, breaking ties by x-coordinate.
- compareTo(Transaction) - Method in class edu.princeton.cs.algorithms.Transaction
-
Compares this transaction to that transaction.
- complete(int) - Static method in class edu.princeton.cs.algorithms.DigraphGenerator
-
Returns the complete digraph on V vertices.
- complete(int) - Static method in class edu.princeton.cs.algorithms.GraphGenerator
-
Returns the complete graph on V vertices.
- completeBipartite(int, int) - Static method in class edu.princeton.cs.algorithms.GraphGenerator
-
Returns a complete bipartite graph on V1 and V2 vertices.
- Complex - Class in edu.princeton.cs.algorithms
-
Compilation: javac Complex.java
Execution: java Complex
Data type for complex numbers.
- Complex(double, double) - Constructor for class edu.princeton.cs.algorithms.Complex
-
- compress() - Static method in class edu.princeton.cs.algorithms.Genome
-
- compress() - Static method in class edu.princeton.cs.algorithms.Huffman
-
- compress() - Static method in class edu.princeton.cs.algorithms.LZW
-
- compress() - Static method in class edu.princeton.cs.algorithms.RunLength
-
- conjugate() - Method in class edu.princeton.cs.algorithms.Complex
-
- connected(int, int) - Method in class edu.princeton.cs.algorithms.QuickFindUF
-
Are the two sites p and q/tt> in the same component?
- connected(int, int) - Method in class edu.princeton.cs.algorithms.QuickUnionUF
-
Are the two sites p and q in the same component?
- connected(int, int) - Method in class edu.princeton.cs.algorithms.UF
-
Are the two sites p and q in the same component?
- connected(int, int) - Method in class edu.princeton.cs.algorithms.WeightedQuickUnionUF
-
Are the two sites p and q in the same component?
- contains(char) - Method in class edu.princeton.cs.algorithms.Alphabet
-
- contains(Key) - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- contains(Key) - Method in class edu.princeton.cs.algorithms.BST
-
Search BST for given key, and return associated value if found,
return null if not found
- contains(int) - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Is i an index on the priority queue?
- contains(int) - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Is i an index on the priority queue?
- contains(double) - Method in class edu.princeton.cs.algorithms.Interval1D
-
Does this interval contain the value x?
- contains(Point2D) - Method in class edu.princeton.cs.algorithms.Interval2D
-
Does this two-dimensional interval contain the point p?
- contains(Key) - Method in class edu.princeton.cs.algorithms.LinearProbingHashST
-
- contains(Key) - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
- contains(Key) - Method in class edu.princeton.cs.algorithms.SeparateChainingHashST
-
- contains(Key) - Method in class edu.princeton.cs.algorithms.SequentialSearchST
-
Does this symbol table contain the given key?
- contains(Key) - Method in class edu.princeton.cs.algorithms.SET
-
Does the set contain the given key?
- contains(Key) - Method in class edu.princeton.cs.algorithms.ST
-
Does this symbol table contain the given key?
- contains(int) - Method in class edu.princeton.cs.algorithms.StaticSETofInts
-
Is the key in this set of integers?
- contains(String) - Method in class edu.princeton.cs.algorithms.SymbolDigraph
-
Does the digraph contain the vertex named s?
- contains(String) - Method in class edu.princeton.cs.algorithms.SymbolGraph
-
Does the graph contain the vertex named s?
- contains(String) - Method in class edu.princeton.cs.algorithms.TrieSET
-
Does the set contain the given key?
- contains(String) - Method in class edu.princeton.cs.algorithms.TrieST
-
Does this symbol table contain the given key?
- contains(String) - Method in class edu.princeton.cs.algorithms.TST
-
Is string key in the symbol table?
- convolve(Complex[], Complex[]) - Static method in class edu.princeton.cs.algorithms.FFT
-
- cos() - Method in class edu.princeton.cs.algorithms.Complex
-
- count() - Method in class edu.princeton.cs.algorithms.CC
-
Returns the number of connected components.
- Count - Class in edu.princeton.cs.algorithms
-
Compilation: javac Count.java
Execution: java Count alpha < input.txt
Create an alphabet specified on the command line, read in a
sequence of characters over that alphabet (ignoring characters
not in the alphabet), computes the frequency of occurrence of
each character, and print out the results.
- Count() - Constructor for class edu.princeton.cs.algorithms.Count
-
- count() - Method in class edu.princeton.cs.algorithms.DepthFirstSearch
-
Returns the number of vertices connected to the source vertex s.
- count() - Method in class edu.princeton.cs.algorithms.DirectedDFS
-
Returns the number of vertices reachable from the source vertex
(or source vertices).
- count() - Method in class edu.princeton.cs.algorithms.GabowSCC
-
Returns the number of strong components.
- count() - Method in class edu.princeton.cs.algorithms.KosarajuSharirSCC
-
Returns the number of strong components.
- count() - Method in class edu.princeton.cs.algorithms.Particle
-
- count() - Method in class edu.princeton.cs.algorithms.QuickFindUF
-
Returns the number of components.
- count() - Method in class edu.princeton.cs.algorithms.QuickUnionUF
-
Returns the number of components.
- count() - Method in class edu.princeton.cs.algorithms.TarjanSCC
-
Returns the number of strong components.
- count(int[]) - Static method in class edu.princeton.cs.algorithms.ThreeSum
-
Returns the number of triples (i, j, k) with i < j < k such that a[i] + a[j] + a[k] == 0.
- count(int[]) - Static method in class edu.princeton.cs.algorithms.ThreeSumFast
-
Returns the number of triples (i, j, k) with i < j < k such that a[i] + a[j] + a[k] == 0.
- count() - Method in class edu.princeton.cs.algorithms.UF
-
Returns the number of components.
- count() - Method in class edu.princeton.cs.algorithms.WeightedQuickUnionUF
-
Returns the number of components.
- Counter - Class in edu.princeton.cs.algorithms
-
The Counter class is a mutable data type to encapsulate a counter.
- Counter(String) - Constructor for class edu.princeton.cs.algorithms.Counter
-
Initializes a new counter starting at 0, with the given id.
- CPM - Class in edu.princeton.cs.algorithms
-
The CPM class provides a client that solves the
parallel precedence-constrained job scheduling problem
via the critical path method.
- Cycle - Class in edu.princeton.cs.algorithms
-
The Cycle class represents a data type for
determining whether an undirected graph has a cycle.
- Cycle(Graph) - Constructor for class edu.princeton.cs.algorithms.Cycle
-
Determines whether the undirected graph G has a cycle and, if so,
finds such a cycle.
- cycle() - Method in class edu.princeton.cs.algorithms.Cycle
-
Returns a cycle if the graph has a cycle, and null otherwise.
- cycle(int) - Static method in class edu.princeton.cs.algorithms.DigraphGenerator
-
Returns a cycle digraph on V vertices.
- cycle() - Method in class edu.princeton.cs.algorithms.DirectedCycle
-
Returns a directed cycle if the digraph has a directed cycle, and null otherwise.
- cycle() - Method in class edu.princeton.cs.algorithms.EdgeWeightedDirectedCycle
-
Returns a directed cycle if the edge-weighted digraph has a directed cycle,
and null otherwise.
- cycle(int) - Static method in class edu.princeton.cs.algorithms.GraphGenerator
-
Returns a cycle graph on V vertices.
- dag(int, int) - Static method in class edu.princeton.cs.algorithms.DigraphGenerator
-
Returns a random simple DAG containing V vertices and E edges.
- Date - Class in edu.princeton.cs.algorithms
-
The Date class is an immutable data type to encapsulate a
date (day, month, and year).
- Date(int, int, int) - Constructor for class edu.princeton.cs.algorithms.Date
-
Initializes a new date from the month, day, and year.
- Date(String) - Constructor for class edu.princeton.cs.algorithms.Date
-
Initializes new date specified as a string in form MM/DD/YYYY.
- day() - Method in class edu.princeton.cs.algorithms.Date
-
Return the day.
- DECIMAL - Static variable in class edu.princeton.cs.algorithms.Alphabet
-
- decreaseKey(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Decrease the key associated with index i to the specified value.
- decreaseKey(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Decrease the key associated with index i to the specified value.
- DeDup - Class in edu.princeton.cs.algorithms
-
Compilation: javac DeDup.java
Execution: java DeDup < input.txt
Dependencies: SET StdIn.java StdOut.java
Data files: http://algs4.cs.princeton.edu/35applications/tinyTale.txt
Read in a list of words from standard input and print out
each word, removing any duplicates.
- DeDup() - Constructor for class edu.princeton.cs.algorithms.DeDup
-
- degree() - Method in class edu.princeton.cs.algorithms.PolynomialRegression
-
Returns the degree of the polynomial to fit
- DegreesOfSeparation - Class in edu.princeton.cs.algorithms
-
The DegreesOfSeparation class provides a client for finding
the degree of separation between one distinguished individual and
every other individual in a social network.
- delete(Key) - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- delete(Key) - Method in class edu.princeton.cs.algorithms.BST
-
- delete(int) - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Remove the key associated with index i.
- delete(int) - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Remove the key associated with index i.
- delete(Key) - Method in class edu.princeton.cs.algorithms.LinearProbingHashST
-
- delete(Key) - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
- delete(Key) - Method in class edu.princeton.cs.algorithms.SeparateChainingHashST
-
- delete(Key) - Method in class edu.princeton.cs.algorithms.SequentialSearchST
-
Removes the key and associated value from the symbol table
(if the key is in the symbol table).
- delete(Key) - Method in class edu.princeton.cs.algorithms.SET
-
Removes the key from the set if the key is present.
- delete(Key) - Method in class edu.princeton.cs.algorithms.ST
-
Removes the key and associated value from the symbol table
(if the key is in the symbol table).
- delete(String) - Method in class edu.princeton.cs.algorithms.TrieSET
-
Removes the key from the set if the key is present.
- delete(String) - Method in class edu.princeton.cs.algorithms.TrieST
-
Removes the key from the set if the key is present.
- deleteMax() - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- deleteMax() - Method in class edu.princeton.cs.algorithms.BST
-
- deleteMax() - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
- deleteMin() - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- deleteMin() - Method in class edu.princeton.cs.algorithms.BST
-
Delete
- deleteMin() - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
Red-black deletion
- delMax() - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Removes a maximum key and returns its associated index.
- delMax() - Method in class edu.princeton.cs.algorithms.MaxPQ
-
Removes and returns a largest key on the priority queue.
- delMin() - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Removes a minimum key and returns its associated index.
- delMin() - Method in class edu.princeton.cs.algorithms.MinPQ
-
Removes and returns a smallest key on the priority queue.
- DepthFirstDirectedPaths - Class in edu.princeton.cs.algorithms
-
The DepthFirstDirectedPaths class represents a data type for finding
directed paths from a source vertex s to every
other vertex in the digraph.
- DepthFirstDirectedPaths(Digraph, int) - Constructor for class edu.princeton.cs.algorithms.DepthFirstDirectedPaths
-
Computes a directed path from s to every other vertex in digraph G.
- DepthFirstOrder - Class in edu.princeton.cs.algorithms
-
The DepthFirstOrder class represents a data type for
determining depth-first search ordering of the vertices in a digraph
or edge-weighted digraph, including preorder, postorder, and reverse postorder.
- DepthFirstOrder(Digraph) - Constructor for class edu.princeton.cs.algorithms.DepthFirstOrder
-
Determines a depth-first order for the digraph G.
- DepthFirstOrder(EdgeWeightedDigraph) - Constructor for class edu.princeton.cs.algorithms.DepthFirstOrder
-
Determines a depth-first order for the edge-weighted digraph G.
- DepthFirstPaths - Class in edu.princeton.cs.algorithms
-
The DepthFirstPaths class represents a data type for finding
paths from a source vertex s to every other vertex
in an undirected graph.
- DepthFirstPaths(Graph, int) - Constructor for class edu.princeton.cs.algorithms.DepthFirstPaths
-
Computes a path between s and every other vertex in graph G.
- DepthFirstSearch - Class in edu.princeton.cs.algorithms
-
The DepthFirstSearch class represents a data type for
determining the vertices connected to a given source vertex s
in an undirected graph.
- DepthFirstSearch(Graph, int) - Constructor for class edu.princeton.cs.algorithms.DepthFirstSearch
-
Computes the vertices in graph G that are
connected to the source vertex s.
- dequeue() - Method in class edu.princeton.cs.algorithms.LinkedQueue
-
Removes and returns the item on this queue that was least recently added.
- dequeue() - Method in class edu.princeton.cs.algorithms.Queue
-
Removes and returns the item on this queue that was least recently added.
- dequeue() - Method in class edu.princeton.cs.algorithms.ResizingArrayQueue
-
Removes and returns the item on this queue that was least recently added.
- Digraph - Class in edu.princeton.cs.algorithms
-
The Digraph class represents a directed graph of vertices
named 0 through V - 1.
- Digraph(int) - Constructor for class edu.princeton.cs.algorithms.Digraph
-
Initializes an empty digraph with V vertices.
- Digraph(In) - Constructor for class edu.princeton.cs.algorithms.Digraph
-
Initializes a digraph from an input stream.
- Digraph(Digraph) - Constructor for class edu.princeton.cs.algorithms.Digraph
-
Initializes a new digraph that is a deep copy of G.
- DigraphGenerator - Class in edu.princeton.cs.algorithms
-
The DigraphGenerator class provides static methods for creating
various digraphs, including Erdos-Renyi random digraphs, random DAGs,
random rooted trees, random rooted DAGs, random tournaments, path digraphs,
cycle digraphs, and the complete digraph.
- DigraphGenerator() - Constructor for class edu.princeton.cs.algorithms.DigraphGenerator
-
- DijkstraAllPairsSP - Class in edu.princeton.cs.algorithms
-
The DijkstraAllPairsSP class represents a data type for solving the
all-pairs shortest paths problem in edge-weighted digraphs
where the edge weights are nonnegative.
- DijkstraAllPairsSP(EdgeWeightedDigraph) - Constructor for class edu.princeton.cs.algorithms.DijkstraAllPairsSP
-
Computes a shortest paths tree from each vertex to to every other vertex in
the edge-weighted digraph G.
- DijkstraSP - Class in edu.princeton.cs.algorithms
-
The DijkstraSP class represents a data type for solving the
single-source shortest paths problem in edge-weighted digraphs
where the edge weights are nonnegative.
- DijkstraSP(EdgeWeightedDigraph, int) - Constructor for class edu.princeton.cs.algorithms.DijkstraSP
-
Computes a shortest paths tree from s to every other vertex in
the edge-weighted digraph G.
- DirectedCycle - Class in edu.princeton.cs.algorithms
-
The DirectedCycle class represents a data type for
determining whether a digraph has a directed cycle.
- DirectedCycle(Digraph) - Constructor for class edu.princeton.cs.algorithms.DirectedCycle
-
Determines whether the digraph G has a directed cycle and, if so,
finds such a cycle.
- DirectedDFS - Class in edu.princeton.cs.algorithms
-
The DirectedDFS class represents a data type for
determining the vertices reachable from a given source vertex s
(or set of source vertices) in a digraph.
- DirectedDFS(Digraph, int) - Constructor for class edu.princeton.cs.algorithms.DirectedDFS
-
Computes the vertices in digraph G that are
reachable from the source vertex s.
- DirectedDFS(Digraph, Iterable<Integer>) - Constructor for class edu.princeton.cs.algorithms.DirectedDFS
-
Computes the vertices in digraph G that are
connected to any of the source vertices sources.
- DirectedEdge - Class in edu.princeton.cs.algorithms
-
- DirectedEdge(int, int, double) - Constructor for class edu.princeton.cs.algorithms.DirectedEdge
-
Initializes a directed edge from vertex v to vertex w with
the given weight.
- direction() - Method in class edu.princeton.cs.algorithms.Vector
-
Returns a unit vector in the direction of this vector.
- dist(int, int) - Method in class edu.princeton.cs.algorithms.DijkstraAllPairsSP
-
Returns the length of a shortest path from vertex s to vertex t.
- dist(int, int) - Method in class edu.princeton.cs.algorithms.FloydWarshall
-
Returns the length of a shortest path from vertex s to vertex t.
- distance() - Method in class edu.princeton.cs.algorithms.ClosestPair
-
- distance() - Method in class edu.princeton.cs.algorithms.FarthestPair
-
- DISTANCE_TO_ORDER - Variable in class edu.princeton.cs.algorithms.Point2D
-
Compares two points by distance to this point.
- distanceSquaredTo(Point2D) - Method in class edu.princeton.cs.algorithms.Point2D
-
Returns the square of the Euclidean distance between this point and that point.
- distanceTo(Point2D) - Method in class edu.princeton.cs.algorithms.Point2D
-
Returns the Euclidean distance between this point and that point.
- distanceTo(Vector) - Method in class edu.princeton.cs.algorithms.Vector
-
Returns the Euclidean distance between this vector and that vector.
- distTo(int) - Method in class edu.princeton.cs.algorithms.AcyclicLP
-
Returns the length of a longest path from the source vertex s to vertex v.
- distTo(int) - Method in class edu.princeton.cs.algorithms.AcyclicSP
-
Returns the length of a shortest path from the source vertex s to vertex v.
- distTo(int) - Method in class edu.princeton.cs.algorithms.BellmanFordSP
-
Returns the length of a shortest path from the source vertex s to vertex v.
- distTo(int) - Method in class edu.princeton.cs.algorithms.BreadthFirstDirectedPaths
-
Returns the number of edges in a shortest path from the source s
(or sources) to vertex v?
- distTo(int) - Method in class edu.princeton.cs.algorithms.BreadthFirstPaths
-
Returns the number of edges in a shortest path between the source vertex s
(or sources) and vertex v?
- distTo(int) - Method in class edu.princeton.cs.algorithms.DijkstraSP
-
Returns the length of a shortest path from the source vertex s to vertex v.
- divides(Complex) - Method in class edu.princeton.cs.algorithms.Complex
-
- DNA - Static variable in class edu.princeton.cs.algorithms.Alphabet
-
- dot(SparseVector) - Method in class edu.princeton.cs.algorithms.SparseVector
-
- dot(double[]) - Method in class edu.princeton.cs.algorithms.SparseVector
-
- dot(Vector) - Method in class edu.princeton.cs.algorithms.Vector
-
Returns the inner product of this vector with that vector.
- DoublingRatio - Class in edu.princeton.cs.algorithms
-
The DoublingRatio class provides a client for measuring
the running time of a method using a doubling ratio test.
- DoublingTest - Class in edu.princeton.cs.algorithms
-
The DoublingTest class provides a client for measuring
the running time of a method using a doubling test.
- draw() - Method in class edu.princeton.cs.algorithms.Interval2D
-
Draws this two-dimensional interval to standard draw.
- draw() - Method in class edu.princeton.cs.algorithms.Particle
-
- draw() - Method in class edu.princeton.cs.algorithms.Point2D
-
Plot this point using standard draw.
- drawTo(Point2D) - Method in class edu.princeton.cs.algorithms.Point2D
-
Plot a line from this point to that point using standard draw.
- dual() - Method in class edu.princeton.cs.algorithms.Simplex
-
- dualCol(int) - Method in class edu.princeton.cs.algorithms.AssignmentProblem
-
- dualRow(int) - Method in class edu.princeton.cs.algorithms.AssignmentProblem
-
- id(int) - Method in class edu.princeton.cs.algorithms.CC
-
Returns the component id of the connected component containing vertex v.
- id(int) - Method in class edu.princeton.cs.algorithms.GabowSCC
-
Returns the component id of the strong component containing vertex v.
- id(int) - Method in class edu.princeton.cs.algorithms.KosarajuSharirSCC
-
Returns the component id of the strong component containing vertex v.
- id(int) - Method in class edu.princeton.cs.algorithms.TarjanSCC
-
Returns the component id of the strong component containing vertex v.
- ifft(Complex[]) - Static method in class edu.princeton.cs.algorithms.FFT
-
- im() - Method in class edu.princeton.cs.algorithms.Complex
-
- increaseKey(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Increase the key associated with index i to the specified value.
- increaseKey(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Increase the key associated with index i to the specified value.
- increment() - Method in class edu.princeton.cs.algorithms.Counter
-
Increments the counter by 1.
- inCut(int) - Method in class edu.princeton.cs.algorithms.FordFulkerson
-
Is vertex v on the s side of the minimum st-cut?
- index(int) - Method in class edu.princeton.cs.algorithms.SuffixArray
-
Returns the index into the original string of the ith smallest suffix.
- index(int) - Method in class edu.princeton.cs.algorithms.SuffixArrayX
-
Returns the index into the original string of the ith smallest suffix.
- index(String) - Method in class edu.princeton.cs.algorithms.SymbolDigraph
-
Returns the integer associated with the vertex named s.
- index(String) - Method in class edu.princeton.cs.algorithms.SymbolGraph
-
Returns the integer associated with the vertex named s.
- IndexMaxPQ<Key extends Comparable<Key>> - Class in edu.princeton.cs.algorithms
-
The IndexMaxPQ class represents an indexed priority queue of generic keys.
- IndexMaxPQ(int) - Constructor for class edu.princeton.cs.algorithms.IndexMaxPQ
-
Initializes an empty indexed priority queue with indices between 0 and NMAX-1.
- IndexMinPQ<Key extends Comparable<Key>> - Class in edu.princeton.cs.algorithms
-
The IndexMinPQ class represents an indexed priority queue of generic keys.
- IndexMinPQ(int) - Constructor for class edu.princeton.cs.algorithms.IndexMinPQ
-
Initializes an empty indexed priority queue with indices between 0 and NMAX-1.
- indexSort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.Insertion
-
Returns a permutation that gives the elements in the array in ascending order.
- indexSort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.Merge
-
Returns a permutation that gives the elements in the array in ascending order.
- insert(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Associate key with index i.
- insert(int, Key) - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Associates key with index i.
- insert(Key) - Method in class edu.princeton.cs.algorithms.MaxPQ
-
Adds a new key to the priority queue.
- insert(Key) - Method in class edu.princeton.cs.algorithms.MinPQ
-
Adds a new key to the priority queue.
- Insertion - Class in edu.princeton.cs.algorithms
-
The Insertion class provides static methods for sorting an
array using insertion sort.
- InsertionX - Class in edu.princeton.cs.algorithms
-
The InsertionX class provides static methods for sorting an
array using an optimized version of insertion sort (with half exchanges
and a sentinel).
- intercept() - Method in class edu.princeton.cs.algorithms.LinearRegression
-
Returns the y-intercept α of the best of the best-fit line y = α + β x.
- interceptStdErr() - Method in class edu.princeton.cs.algorithms.LinearRegression
-
Returns the standard error of the estimate for the intercept.
- intersects(Interval1D) - Method in class edu.princeton.cs.algorithms.Interval1D
-
Does this interval intersect that interval?
- intersects(Interval2D) - Method in class edu.princeton.cs.algorithms.Interval2D
-
Does this two-dimensional interval intersect that two-dimensional interval?
- intersects(SET<Key>) - Method in class edu.princeton.cs.algorithms.SET
-
Returns the intersection of this set and that set.
- Interval1D - Class in edu.princeton.cs.algorithms
-
The Interval1D class represents a one-dimensional closed interval.
- Interval1D(double, double) - Constructor for class edu.princeton.cs.algorithms.Interval1D
-
Initializes an interval [left, right].
- Interval2D - Class in edu.princeton.cs.algorithms
-
The Interval2D class represents a closed two-dimensional interval,
which represents all points (x, y) with both xleft <= x <= xright and
yleft <= y <= right.
- Interval2D(Interval1D, Interval1D) - Constructor for class edu.princeton.cs.algorithms.Interval2D
-
Initializes a two-dimensional interval.
- isAfter(Date) - Method in class edu.princeton.cs.algorithms.Date
-
Is this date after b?
- isBefore(Date) - Method in class edu.princeton.cs.algorithms.Date
-
Is this date before b?
- isBipartite() - Method in class edu.princeton.cs.algorithms.Bipartite
-
Is the graph bipartite?
- isEmpty() - Method in class edu.princeton.cs.algorithms.Bag
-
Is this bag empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- isEmpty() - Method in class edu.princeton.cs.algorithms.BST
-
- isEmpty() - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Is the priority queue empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Is the priority queue empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.LinearProbingHashST
-
- isEmpty() - Method in class edu.princeton.cs.algorithms.LinkedBag
-
Is this bag empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.LinkedQueue
-
Is this queue empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.LinkedStack
-
Is this stack empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.MaxPQ
-
Is the priority queue empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.MinPQ
-
Is the priority queue empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.Queue
-
Is this queue empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
- isEmpty() - Method in class edu.princeton.cs.algorithms.ResizingArrayBag
-
Is this bag empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.ResizingArrayQueue
-
Is this queue empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.ResizingArrayStack
-
Is this stack empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.SeparateChainingHashST
-
- isEmpty() - Method in class edu.princeton.cs.algorithms.SequentialSearchST
-
Is this symbol table empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.SET
-
Is the set empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.ST
-
Is this symbol table empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.Stack
-
Is this stack empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.TrieSET
-
Is the set empty?
- isEmpty() - Method in class edu.princeton.cs.algorithms.TrieST
-
Is this symbol table empty?
- iterator() - Method in class edu.princeton.cs.algorithms.Bag
-
Returns an iterator that iterates over the items in the bag in arbitrary order.
- iterator() - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Returns an iterator that iterates over the keys on the
priority queue in descending order.
- iterator() - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Returns an iterator that iterates over the keys on the
priority queue in ascending order.
- iterator() - Method in class edu.princeton.cs.algorithms.LinkedBag
-
Returns an iterator that iterates over the items in the bag.
- iterator() - Method in class edu.princeton.cs.algorithms.LinkedQueue
-
Returns an iterator that iterates over the items in this queue in FIFO order.
- iterator() - Method in class edu.princeton.cs.algorithms.LinkedStack
-
Returns an iterator to this stack that iterates through the items in LIFO order.
- iterator() - Method in class edu.princeton.cs.algorithms.MaxPQ
-
Returns an iterator that iterates over the keys on the priority queue
in descending order.
- iterator() - Method in class edu.princeton.cs.algorithms.MinPQ
-
Returns an iterator that iterates over the keys on the priority queue
in ascending order.
- iterator() - Method in class edu.princeton.cs.algorithms.Queue
-
Returns an iterator that iterates over the items in this queue in FIFO order.
- iterator() - Method in class edu.princeton.cs.algorithms.ResizingArrayBag
-
Returns an iterator that iterates over the items in the bag in arbitrary order.
- iterator() - Method in class edu.princeton.cs.algorithms.ResizingArrayQueue
-
Returns an iterator that iterates over the items in this queue in FIFO order.
- iterator() - Method in class edu.princeton.cs.algorithms.ResizingArrayStack
-
Returns an iterator to this stack that iterates through the items in LIFO order.
- iterator() - Method in class edu.princeton.cs.algorithms.SET
-
Returns all of the keys in the set, as an iterator.
- iterator() - Method in class edu.princeton.cs.algorithms.ST
-
Deprecated.
Use ST.keys() instead.
This method is provided for backward compatibility with the version from
Introduction to Programming in Java: An Interdisciplinary Approach.
- iterator() - Method in class edu.princeton.cs.algorithms.Stack
-
Returns an iterator to this stack that iterates through the items in LIFO order.
- iterator() - Method in class edu.princeton.cs.algorithms.TrieSET
-
Returns all of the keys in the set, as an iterator.
- LazyPrimMST - Class in edu.princeton.cs.algorithms
-
The LazyPrimMST class represents a data type for computing a
minimum spanning tree in an edge-weighted graph.
- LazyPrimMST(EdgeWeightedGraph) - Constructor for class edu.princeton.cs.algorithms.LazyPrimMST
-
Compute a minimum spanning tree (or forest) of an edge-weighted graph.
- lcp(int) - Method in class edu.princeton.cs.algorithms.SuffixArray
-
Returns the length of the longest common prefix of the ith
smallest suffix and the i-1st smallest suffix.
- lcp(int) - Method in class edu.princeton.cs.algorithms.SuffixArrayX
-
Returns the length of the longest common prefix of the ith
smallest suffix and the i-1st smallest suffix.
- left() - Method in class edu.princeton.cs.algorithms.Interval1D
-
Returns the left endpoint.
- LEFT_ENDPOINT_ORDER - Static variable in class edu.princeton.cs.algorithms.Interval1D
-
Compares two intervals by left endpoint.
- length() - Method in class edu.princeton.cs.algorithms.Interval1D
-
Returns the length of this interval.
- length() - Method in class edu.princeton.cs.algorithms.SuffixArray
-
Returns the length of the input string.
- length() - Method in class edu.princeton.cs.algorithms.SuffixArrayX
-
Returns the length of the input string.
- length() - Method in class edu.princeton.cs.algorithms.Vector
-
Returns the length of this vector.
- LENGTH_ORDER - Static variable in class edu.princeton.cs.algorithms.Interval1D
-
Compares two intervals by length.
- levelOrder() - Method in class edu.princeton.cs.algorithms.BST
-
- lgR() - Method in class edu.princeton.cs.algorithms.Alphabet
-
- LinearProbingHashST<Key,Value> - Class in edu.princeton.cs.algorithms
-
Compilation: javac LinearProbingHashST.java
Execution: java LinearProbingHashST
Symbol table implementation with linear probing hash table.
- LinearProbingHashST() - Constructor for class edu.princeton.cs.algorithms.LinearProbingHashST
-
- LinearProbingHashST(int) - Constructor for class edu.princeton.cs.algorithms.LinearProbingHashST
-
- LinearRegression - Class in edu.princeton.cs.algorithms
-
The LinearRegression class performs a simple linear regression
on an set of N data points (yi, xi).
- LinearRegression(double[], double[]) - Constructor for class edu.princeton.cs.algorithms.LinearRegression
-
Performs a linear regression on the data points (y[i], x[i]).
- LinkedBag<Item> - Class in edu.princeton.cs.algorithms
-
The LinkedBag class represents a bag (or multiset) of
generic items.
- LinkedBag() - Constructor for class edu.princeton.cs.algorithms.LinkedBag
-
Initializes an empty bag.
- LinkedQueue<Item> - Class in edu.princeton.cs.algorithms
-
The LinkedQueue class represents a first-in-first-out (FIFO)
queue of generic items.
- LinkedQueue() - Constructor for class edu.princeton.cs.algorithms.LinkedQueue
-
Initializes an empty queue.
- LinkedStack<Item> - Class in edu.princeton.cs.algorithms
-
The LinkedStack class represents a last-in-first-out (LIFO) stack of
generic items.
- LinkedStack() - Constructor for class edu.princeton.cs.algorithms.LinkedStack
-
Initializes an empty stack.
- LongestCommonSubstring - Class in edu.princeton.cs.algorithms
-
Compilation: javac LongestCommonSubstring.java
Execution: java LongestCommonSubstring file1.txt file2.txt
Dependencies: SuffixArray.java StdOut.java In.java
Reads in two text strings, replaces all consecutive blocks of
whitespace with a single space, and then computes the longest
common substring.
- LongestCommonSubstring() - Constructor for class edu.princeton.cs.algorithms.LongestCommonSubstring
-
- longestPrefixOf(String) - Method in class edu.princeton.cs.algorithms.TrieSET
-
Returns the string in the set that is the longest prefix of query,
or null, if no such string.
- longestPrefixOf(String) - Method in class edu.princeton.cs.algorithms.TrieST
-
Returns the string in the symbol table that is the longest prefix of query,
or null, if no such string.
- longestPrefixOf(String) - Method in class edu.princeton.cs.algorithms.TST
-
Find and return longest prefix of s in TST
- LookupCSV - Class in edu.princeton.cs.algorithms
-
Compilation: javac LookupCSV.java
Execution: java LookupCSV file.csv keyField valField
Dependencies: ST.java In.java StdIn.java StdOut.java
Data files: http://algs4.cs.princeton.edu/35applications/DJIA.csv
http://algs4.cs.princeton.edu/35applications/UPC.csv
http://algs4.cs.princeton.edu/35applications/amino.csv
http://algs4.cs.princeton.edu/35applications/elements.csv
http://algs4.cs.princeton.edu/35applications/ip.csv
http://algs4.cs.princeton.edu/35applications/morse.csv
Reads in a set of key-value pairs from a two-column CSV file
specified on the command line; then, reads in keys from standard
input and prints out corresponding values.
- LookupCSV() - Constructor for class edu.princeton.cs.algorithms.LookupCSV
-
- LookupIndex - Class in edu.princeton.cs.algorithms
-
Compilation: javac LookupIndex.java
Execution: java LookupIndex movies.txt "/"
Dependencies: ST.java Queue.java In.java StdIn.java StdOut.java
Data files: http://algs4.cs.princeton.edu/35applications/aminoI.csv
http://algs4.cs.princeton.edu/35applications/movies.txt
% java LookupIndex aminoI.csv ","
Serine
TCT
TCA
TCG
AGT
AGC
TCG
Serine
% java LookupIndex movies.txt "/"
Bacon, Kevin
Animal House (1978)
Apollo 13 (1995)
Beauty Shop (2005)
Diner (1982)
Few Good Men, A (1992)
Flatliners (1990)
Footloose (1984)
Friday the 13th (1980)
...
- LookupIndex() - Constructor for class edu.princeton.cs.algorithms.LookupIndex
-
- LOWERCASE - Static variable in class edu.princeton.cs.algorithms.Alphabet
-
- LRS - Class in edu.princeton.cs.algorithms
-
Compilation: javac LRS.java
Execution: java LRS < file.txt
Dependencies: StdIn.java SuffixArray.java
Data files: http://algs4.cs.princeton.edu/63suffix/tinyTale.txt
http://algs4.cs.princeton.edu/63suffix/mobydick.txt
Reads a text string from stdin, replaces all consecutive blocks of
whitespace with a single space, and then computes the longest
repeated substring in that text using a suffix array.
- LRS() - Constructor for class edu.princeton.cs.algorithms.LRS
-
- LSD - Class in edu.princeton.cs.algorithms
-
Compilation: javac LSD.java
Execution: java LSD < input.txt
LSD radix sort an array of extended ASCII strings, each of length W.
- LSD() - Constructor for class edu.princeton.cs.algorithms.LSD
-
- lsolve(double[][], double[]) - Static method in class edu.princeton.cs.algorithms.GaussianElimination
-
- LZW - Class in edu.princeton.cs.algorithms
-
Compilation: javac LZW.java
Execution: java LZW - < input.txt (compress)
Execution: java LZW + < input.txt (expand)
Dependencies: BinaryIn.java BinaryOut.java
Compress or expand binary input from standard input using LZW.
- LZW() - Constructor for class edu.princeton.cs.algorithms.LZW
-
- magnitude() - Method in class edu.princeton.cs.algorithms.Vector
-
Returns the Euclidean norm of this vector.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.AcyclicLP
-
Unit tests the AcyclicLP data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.AcyclicSP
-
Unit tests the AcyclicSP data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.AdjMatrixEdgeWeightedDigraph
-
Unit tests the AdjMatrixEdgeWeightedDigraph data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Alphabet
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Arbitrage
-
Reads the currency exchange table from standard input and
prints an arbitrage opportunity to standard output (if one exists).
- main(String[]) - Static method in class edu.princeton.cs.algorithms.AssignmentProblem
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Average
-
Reads in a sequence of real numbers from standard input and prints
out their average to standard output.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Bag
-
Unit tests the Bag data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BellmanFordSP
-
Unit tests the BellmanFordSP data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BinaryDump
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BinarySearch
-
Reads in a sequence of integers from the whitelist file, specified as
a command-line argument.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BinarySearchST
-
Test client
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Bipartite
-
Unit tests the Bipartite data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BipartiteMatching
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BlackFilter
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BoruvkaMST
-
Unit tests the BoruvkaMST data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BoyerMoore
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BreadthFirstDirectedPaths
-
Unit tests the BreadthFirstDirectedPaths data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BreadthFirstPaths
-
Unit tests the BreadthFirstPaths data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BST
-
Test client
- main(String[]) - Static method in class edu.princeton.cs.algorithms.BTree
-
test client
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Cat
-
Reads in a sequence of text files specified as the first command-line
arguments, concatenates them, and writes the results to the file
specified as the last command-line argument.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.CC
-
Unit tests the CC data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.ClosestPair
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.CollisionSystem
-
Sample client
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Complex
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Count
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Counter
-
Reads two command-line integers N and T; creates N counters;
increments T counters at random; and prints results.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.CPM
-
Reads the precedence constraints from standard input
and prints a feasible schedule to standard output.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Cycle
-
Unit tests the Cycle data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Date
-
Unit tests the date data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DeDup
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DegreesOfSeparation
-
Reads in a social network from a file, and then repeatedly reads in
individuals from standard input and prints out their degrees of
separation.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DepthFirstDirectedPaths
-
Unit tests the DepthFirstDirectedPaths data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DepthFirstOrder
-
Unit tests the DepthFirstOrder data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DepthFirstPaths
-
Unit tests the DepthFirstPaths data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DepthFirstSearch
-
Unit tests the DepthFirstSearch data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Digraph
-
Unit tests the Digraph data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DigraphGenerator
-
Unit tests the DigraphGenerator library.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DijkstraSP
-
Unit tests the DijkstraSP data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DirectedCycle
-
Unit tests the DirectedCycle data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DirectedDFS
-
Unit tests the DirectedDFS data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DirectedEdge
-
Unit tests the DirectedEdge data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DoublingRatio
-
Prints table of running times to call ThreeSum.count()
for arrays of size 250, 500, 1000, 2000, and so forth, along
with ratios of running times between successive array sizes.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.DoublingTest
-
Prints table of running times to call ThreeSum.count()
for arrays of size 250, 500, 1000, 2000, and so forth.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Edge
-
Unit tests the Edge data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.EdgeWeightedDigraph
-
Unit tests the EdgeWeightedDigraph data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.EdgeWeightedDirectedCycle
-
Unit tests the EdgeWeightedDirectedCycle data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.EdgeWeightedGraph
-
Unit tests the EdgeWeightedGraph data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.FarthestPair
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.FFT
-
Test client and sample execution
% java FFT 4
x
-------------------
-0.03480425839330703
0.07910192950176387
0.7233322451735928
0.1659819820667019
y = fft(x)
-------------------
0.9336118983487516
-0.7581365035668999 + 0.08688005256493803i
0.44344407521182005
-0.7581365035668999 - 0.08688005256493803i
z = ifft(y)
-------------------
-0.03480425839330703
0.07910192950176387 + 2.6599344570851287E-18i
0.7233322451735928
0.1659819820667019 - 2.6599344570851287E-18i
c = cconvolve(x, x)
-------------------
0.5506798633981853
0.23461407150576394 - 4.033186818023279E-18i
-0.016542951108772352
0.10288019294318276 + 4.033186818023279E-18i
d = convolve(x, x)
-------------------
0.001211336402308083 - 3.122502256758253E-17i
-0.005506167987577068 - 5.058885073636224E-17i
-0.044092969479563274 + 2.1934338938072244E-18i
0.10288019294318276 - 3.6147323062478115E-17i
0.5494685269958772 + 3.122502256758253E-17i
0.240120239493341 + 4.655566391833896E-17i
0.02755001837079092 - 2.1934338938072244E-18i
4.01805098805014E-17i
- main(String[]) - Static method in class edu.princeton.cs.algorithms.FileIndex
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.FlowEdge
-
Unit tests the FlowEdge data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.FlowNetwork
-
Unit tests the FlowNetwork data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.FloydWarshall
-
Unit tests the FloydWarshall data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.FordFulkerson
-
Unit tests the FordFulkerson data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.FrequencyCounter
-
Reads in a command-line integer and sequence of words from
standard input and prints out a word (whose length exceeds
the threshold) that occurs most frequently to standard output.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.GabowSCC
-
Unit tests the GabowSCC data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.GaussianElimination
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Genome
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.GrahamScan
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Graph
-
Unit tests the Graph data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.GraphGenerator
-
Unit tests the GraphGenerator library.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.GREP
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Heap
-
Reads in a sequence of strings from standard input; heapsorts them;
and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.HexDump
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Huffman
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Unit tests the IndexMaxPQ data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Unit tests the IndexMinPQ data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Insertion
-
Reads in a sequence of strings from standard input; insertion sorts them;
and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.InsertionX
-
Reads in a sequence of strings from standard input; insertion sorts them;
and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Interval1D
-
Unit tests the Interval1D data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Interval2D
-
Unit tests the Interval2D data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.KMP
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Knuth
-
Reads in a sequence of strings from standard input, shuffles
them, and prints out the results.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.KosarajuSharirSCC
-
Unit tests the KosarajuSharirSCC data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.KruskalMST
-
Unit tests the KruskalMST data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.KWIK
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LazyPrimMST
-
Unit tests the LazyPrimMST data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LinearProbingHashST
-
Unit test client.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LinkedBag
-
Unit tests the LinkedBag data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LinkedQueue
-
Unit tests the LinkedQueue data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LinkedStack
-
Unit tests the LinkedStack data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LongestCommonSubstring
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LookupCSV
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LookupIndex
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LRS
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LSD
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.LZW
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.MaxPQ
-
Unit tests the MaxPQ data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Merge
-
Reads in a sequence of strings from standard input; mergesorts them;
and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.MergeBU
-
Reads in a sequence of strings from standard input; bottom-up
mergesorts them; and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.MergeX
-
Reads in a sequence of strings from standard input; mergesorts them
(using an optimized version of mergesort);
and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.MinPQ
-
Unit tests the MinPQ data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.MSD
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Multiway
-
Reads sorted text files specified as command-line arguments;
merges them together into a sorted output; and writes
the results to standard output.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.NFA
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.PictureDump
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Point2D
-
Unit tests the point data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.PolynomialRegression
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.PrimMST
-
Unit tests the PrimMST data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Queue
-
Unit tests the Queue data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Quick
-
Reads in a sequence of strings from standard input; quicksorts them;
and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Quick3string
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Quick3way
-
Reads in a sequence of strings from standard input; 3-way
quicksorts them; and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.QuickFindUF
-
Reads in a sequence of pairs of integers (between 0 and N-1) from standard input,
where each integer represents some object;
if the objects are in different components, merge the two components
and print the pair to standard output.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.QuickUnionUF
-
Reads in a sequence of pairs of integers (between 0 and N-1) from standard input,
where each integer represents some object;
if the objects are in different components, merge the two components
and print the pair to standard output.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.QuickX
-
Reads in a sequence of strings from standard input; quicksorts them
(using an optimized version of quicksort);
and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.RabinKarp
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.RandomSeq
-
Reads in two command-line arguments lo and hi and prints N uniformly
random real numbers in [lo, hi) to standard output.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.RedBlackBST
-
Test client
- main(String[]) - Static method in class edu.princeton.cs.algorithms.ResizingArrayBag
-
Unit tests the ResizingArrayBag data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.ResizingArrayQueue
-
Unit tests the ResizingArrayQueue data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.ResizingArrayStack
-
Unit tests the Stack data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.RunLength
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Selection
-
Reads in a sequence of strings from standard input; selection sorts them;
and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.SeparateChainingHashST
-
Unit test client.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.SequentialSearchST
-
Unit tests the SequentialSearchST data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.SET
-
Unit tests the SET data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Shell
-
Reads in a sequence of strings from standard input; Shellsorts them;
and prints them to standard output in ascending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Simplex
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.SparseVector
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.ST
-
Unit tests the ST data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Stack
-
Unit tests the Stack data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.SuffixArray
-
Unit tests the SuffixArray data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.SuffixArrayX
-
Unit tests the SuffixArrayx data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.SymbolDigraph
-
Unit tests the SymbolDigraph data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.SymbolGraph
-
Unit tests the SymbolGraph data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.TarjanSCC
-
Unit tests the TarjanSCC data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.ThreeSum
-
Reads in a sequence of integers from a file, specified as a command-line argument;
counts the number of triples sum to exactly zero; prints out the time to perform
the computation.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.ThreeSumFast
-
Reads in a sequence of distinct integers from a file, specified as a command-line argument;
counts the number of triples sum to exactly zero; prints out the time to perform
the computation.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.TopM
-
Reads a sequence of transactions from standard input; takes a
command-line integer M; prints to standard output the M largest
transactions in descending order.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Topological
-
Unit tests the Topological data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Transaction
-
Unit tests the transaction data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.TransitiveClosure
-
Unit tests the TransitiveClosure data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.TrieSET
-
Unit tests the TrieSET data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.TrieST
-
Unit tests the TrieSET data type.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.TST
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.UF
-
Reads in a an integer N and a sequence of pairs of integers
(between 0 and N-1) from standard input, where each integer
in the pair represents some site;
if the sites are in different components, merge the two components
and print the pair to standard output.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Vector
-
Unit tests the data type methods.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.WeightedQuickUnionUF
-
Reads in a sequence of pairs of integers (between 0 and N-1) from standard input,
where each integer represents some object;
if the objects are in different components, merge the two components
and print the pair to standard output.
- main(String[]) - Static method in class edu.princeton.cs.algorithms.WhiteFilter
-
- main(String[]) - Static method in class edu.princeton.cs.algorithms.Whitelist
-
Reads in a sequence of integers from the whitelist file, specified as
a command-line argument.
- marked(int) - Method in class edu.princeton.cs.algorithms.DepthFirstSearch
-
Is there a path between the source vertex s and vertex v?
- marked(int) - Method in class edu.princeton.cs.algorithms.DirectedDFS
-
Is there a directed path from the source vertex (or any
of the source vertices) and vertex v?
- max() - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- max() - Method in class edu.princeton.cs.algorithms.BST
-
- max() - Method in class edu.princeton.cs.algorithms.MaxPQ
-
Returns a largest key on the priority queue.
- max() - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
- max() - Method in class edu.princeton.cs.algorithms.SET
-
Returns the largest key in the set.
- max() - Method in class edu.princeton.cs.algorithms.ST
-
Returns the largest key in the symbol table.
- maxIndex() - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Returns an index associated with a maximum key.
- maxKey() - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Return a maximum key.
- MaxPQ<Key> - Class in edu.princeton.cs.algorithms
-
The MaxPQ class represents a priority queue of generic keys.
- MaxPQ(int) - Constructor for class edu.princeton.cs.algorithms.MaxPQ
-
Initializes an empty priority queue with the given initial capacity.
- MaxPQ() - Constructor for class edu.princeton.cs.algorithms.MaxPQ
-
Initializes an empty priority queue.
- MaxPQ(int, Comparator<Key>) - Constructor for class edu.princeton.cs.algorithms.MaxPQ
-
Initializes an empty priority queue with the given initial capacity,
using the given comparator.
- MaxPQ(Comparator<Key>) - Constructor for class edu.princeton.cs.algorithms.MaxPQ
-
Initializes an empty priority queue using the given comparator.
- MaxPQ(Key[]) - Constructor for class edu.princeton.cs.algorithms.MaxPQ
-
Initializes a priority queue from the array of keys.
- Merge - Class in edu.princeton.cs.algorithms
-
The Merge class provides static methods for sorting an
array using mergesort.
- MergeBU - Class in edu.princeton.cs.algorithms
-
The MergeBU class provides static methods for sorting an
array using bottom-up mergesort.
- MergeX - Class in edu.princeton.cs.algorithms
-
The MergeX class provides static methods for sorting an
array using an optimized version of mergesort.
- min() - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
Ordered symbol table methods
- min() - Method in class edu.princeton.cs.algorithms.BST
-
Min, max, floor, and ceiling
- min() - Method in class edu.princeton.cs.algorithms.MinPQ
-
Returns a smallest key on the priority queue.
- min() - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
Ordered symbol table methods.
- min() - Method in class edu.princeton.cs.algorithms.SET
-
Returns the smallest key in the set.
- min() - Method in class edu.princeton.cs.algorithms.ST
-
Returns the smallest key in the symbol table.
- minIndex() - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Returns an index associated with a minimum key.
- minKey() - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Returns a minimum key.
- MinPQ<Key> - Class in edu.princeton.cs.algorithms
-
The MinPQ class represents a priority queue of generic keys.
- MinPQ(int) - Constructor for class edu.princeton.cs.algorithms.MinPQ
-
Initializes an empty priority queue with the given initial capacity.
- MinPQ() - Constructor for class edu.princeton.cs.algorithms.MinPQ
-
Initializes an empty priority queue.
- MinPQ(int, Comparator<Key>) - Constructor for class edu.princeton.cs.algorithms.MinPQ
-
Initializes an empty priority queue with the given initial capacity,
using the given comparator.
- MinPQ(Comparator<Key>) - Constructor for class edu.princeton.cs.algorithms.MinPQ
-
Initializes an empty priority queue using the given comparator.
- MinPQ(Key[]) - Constructor for class edu.princeton.cs.algorithms.MinPQ
-
Initializes a priority queue from the array of keys.
- minus(Complex) - Method in class edu.princeton.cs.algorithms.Complex
-
- minus(Vector) - Method in class edu.princeton.cs.algorithms.Vector
-
Returns the difference between this vector and that vector: this - that.
- month() - Method in class edu.princeton.cs.algorithms.Date
-
Return the month.
- move(double) - Method in class edu.princeton.cs.algorithms.Particle
-
- MSD - Class in edu.princeton.cs.algorithms
-
Compilation: javac MSD.java
Execution: java MSD < input.txt
Reads extended ASCII string from standard input and MSD radix sorts them.
- MSD() - Constructor for class edu.princeton.cs.algorithms.MSD
-
- Multiway - Class in edu.princeton.cs.algorithms
-
The Multiway class provides a client for reading in several
sorted text files and merging them together into a single sorted
text stream.
- Particle - Class in edu.princeton.cs.algorithms
-
- Particle(double, double, double, double, double, double, Color) - Constructor for class edu.princeton.cs.algorithms.Particle
-
- Particle() - Constructor for class edu.princeton.cs.algorithms.Particle
-
- path(int) - Static method in class edu.princeton.cs.algorithms.DigraphGenerator
-
Returns a path digraph on V vertices.
- path(int, int) - Method in class edu.princeton.cs.algorithms.DijkstraAllPairsSP
-
Returns a shortest path from vertex s to vertex t.
- path(int, int) - Method in class edu.princeton.cs.algorithms.FloydWarshall
-
Returns a shortest path from vertex s to vertex t.
- path(int) - Static method in class edu.princeton.cs.algorithms.GraphGenerator
-
Returns a path graph on V vertices.
- pathTo(int) - Method in class edu.princeton.cs.algorithms.AcyclicLP
-
Returns a longest path from the source vertex s to vertex v.
- pathTo(int) - Method in class edu.princeton.cs.algorithms.AcyclicSP
-
Returns a shortest path from the source vertex s to vertex v.
- pathTo(int) - Method in class edu.princeton.cs.algorithms.BellmanFordSP
-
Returns a shortest path from the source s to vertex v.
- pathTo(int) - Method in class edu.princeton.cs.algorithms.BreadthFirstDirectedPaths
-
Returns a shortest path from s (or sources) to v, or
null if no such path.
- pathTo(int) - Method in class edu.princeton.cs.algorithms.BreadthFirstPaths
-
Returns a shortest path between the source vertex s (or sources)
and v, or null if no such path.
- pathTo(int) - Method in class edu.princeton.cs.algorithms.DepthFirstDirectedPaths
-
Returns a directed path from the source vertex s to vertex v, or
null if no such path.
- pathTo(int) - Method in class edu.princeton.cs.algorithms.DepthFirstPaths
-
Returns a path between the source vertex s and vertex v, or
null if no such path.
- pathTo(int) - Method in class edu.princeton.cs.algorithms.DijkstraSP
-
Returns a shortest path from the source vertex s to vertex v.
- peek() - Method in class edu.princeton.cs.algorithms.LinkedQueue
-
Returns the item least recently added to this queue.
- peek() - Method in class edu.princeton.cs.algorithms.LinkedStack
-
Returns (but does not remove) the item most recently added to this stack.
- peek() - Method in class edu.princeton.cs.algorithms.Queue
-
Returns the item least recently added to this queue.
- peek() - Method in class edu.princeton.cs.algorithms.ResizingArrayQueue
-
Returns the item least recently added to this queue.
- peek() - Method in class edu.princeton.cs.algorithms.ResizingArrayStack
-
Returns (but does not remove) the item most recently added to this stack.
- peek() - Method in class edu.princeton.cs.algorithms.Stack
-
Returns (but does not remove) the item most recently added to this stack.
- phase() - Method in class edu.princeton.cs.algorithms.Complex
-
- PictureDump - Class in edu.princeton.cs.algorithms
-
- PictureDump() - Constructor for class edu.princeton.cs.algorithms.PictureDump
-
- plus(Complex) - Method in class edu.princeton.cs.algorithms.Complex
-
- plus(Complex, Complex) - Static method in class edu.princeton.cs.algorithms.Complex
-
- plus(SparseVector) - Method in class edu.princeton.cs.algorithms.SparseVector
-
- plus(Vector) - Method in class edu.princeton.cs.algorithms.Vector
-
Returns the sum of this vector and that vector: this + that.
- Point2D - Class in edu.princeton.cs.algorithms
-
The Point class is an immutable data type to encapsulate a
two-dimensional point with real-value coordinates.
- Point2D(double, double) - Constructor for class edu.princeton.cs.algorithms.Point2D
-
Initializes a new point (x, y).
- POLAR_ORDER - Variable in class edu.princeton.cs.algorithms.Point2D
-
Compares two points by polar angle (between 0 and 2pi) with respect to this point.
- PolynomialRegression - Class in edu.princeton.cs.algorithms
-
The PolynomialRegression class performs a polynomial regression
on an set of N data points (yi, xi).
- PolynomialRegression(double[], double[], int) - Constructor for class edu.princeton.cs.algorithms.PolynomialRegression
-
Performs a polynomial reggression on the data points (y[i], x[i]).
- pop() - Method in class edu.princeton.cs.algorithms.LinkedStack
-
Removes and returns the item most recently added to this stack.
- pop() - Method in class edu.princeton.cs.algorithms.ResizingArrayStack
-
Removes and returns the item most recently added to this stack.
- pop() - Method in class edu.princeton.cs.algorithms.Stack
-
Removes and returns the item most recently added to this stack.
- post(int) - Method in class edu.princeton.cs.algorithms.DepthFirstOrder
-
Returns the postorder number of vertex v.
- post() - Method in class edu.princeton.cs.algorithms.DepthFirstOrder
-
Returns the vertices in postorder.
- pre(int) - Method in class edu.princeton.cs.algorithms.DepthFirstOrder
-
Returns the preorder number of vertex v.
- pre() - Method in class edu.princeton.cs.algorithms.DepthFirstOrder
-
Returns the vertices in preorder.
- predict(double) - Method in class edu.princeton.cs.algorithms.LinearRegression
-
Returns the expected response y given the value of the predictor
variable x.
- predict(double) - Method in class edu.princeton.cs.algorithms.PolynomialRegression
-
Returns the expected response y given the value of the predictor
variable x.
- prefixMatch(String) - Method in class edu.princeton.cs.algorithms.TST
-
- primal() - Method in class edu.princeton.cs.algorithms.Simplex
-
- PrimMST - Class in edu.princeton.cs.algorithms
-
The PrimMST class represents a data type for computing a
minimum spanning tree in an edge-weighted graph.
- PrimMST(EdgeWeightedGraph) - Constructor for class edu.princeton.cs.algorithms.PrimMST
-
Compute a minimum spanning tree (or forest) of an edge-weighted graph.
- printAll(int[]) - Static method in class edu.princeton.cs.algorithms.ThreeSum
-
Prints to standard output the (i, j, k) with i < j < k such that a[i] + a[j] + a[k] == 0.
- printAll(int[]) - Static method in class edu.princeton.cs.algorithms.ThreeSumFast
-
Prints to standard output the (i, j, k) with i < j < k such that a[i] + a[j] + a[k] == 0.
- PROTEIN - Static variable in class edu.princeton.cs.algorithms.Alphabet
-
- push(Item) - Method in class edu.princeton.cs.algorithms.LinkedStack
-
Adds the item to this stack.
- push(Item) - Method in class edu.princeton.cs.algorithms.ResizingArrayStack
-
Adds the item to this stack.
- push(Item) - Method in class edu.princeton.cs.algorithms.Stack
-
Adds the item to this stack.
- put(Key, Value) - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- put(Key, Value) - Method in class edu.princeton.cs.algorithms.BST
-
Insert key-value pair into BST
If key already exists, update with new value
- put(Key, Value) - Method in class edu.princeton.cs.algorithms.BTree
-
- put(Key, Value) - Method in class edu.princeton.cs.algorithms.LinearProbingHashST
-
- put(Key, Value) - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
Red-black insertion
- put(Key, Value) - Method in class edu.princeton.cs.algorithms.SeparateChainingHashST
-
- put(Key, Value) - Method in class edu.princeton.cs.algorithms.SequentialSearchST
-
Inserts the key-value pair into the symbol table, overwriting the old value
with the new value if the key is already in the symbol table.
- put(int, double) - Method in class edu.princeton.cs.algorithms.SparseVector
-
- put(Key, Value) - Method in class edu.princeton.cs.algorithms.ST
-
Inserts the key-value pair into the symbol table, overwriting the old value
with the new value if the key is already in the symbol table.
- put(String, Value) - Method in class edu.princeton.cs.algorithms.TrieST
-
Inserts the key-value pair into the symbol table, overwriting the old value
with the new value if the key is already in the symbol table.
- put(String, Value) - Method in class edu.princeton.cs.algorithms.TST
-
Insert string s into the symbol table.
- scale(double) - Method in class edu.princeton.cs.algorithms.SparseVector
-
- search(String) - Method in class edu.princeton.cs.algorithms.BoyerMoore
-
- search(char[]) - Method in class edu.princeton.cs.algorithms.BoyerMoore
-
- search(String) - Method in class edu.princeton.cs.algorithms.KMP
-
- search(char[]) - Method in class edu.princeton.cs.algorithms.KMP
-
- search(String) - Method in class edu.princeton.cs.algorithms.RabinKarp
-
- select(int) - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- select(int) - Method in class edu.princeton.cs.algorithms.BST
-
Rank and selection
- select(Comparable[], int) - Static method in class edu.princeton.cs.algorithms.Quick
-
Rearranges the array so that a[k] contains the kth smallest key;
a[0] through a[k-1] are less than (or equal to) a[k]; and
a[k+1] through a[N-1] are greater than (or equal to) a[k].
- select(int) - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
- select(int) - Method in class edu.princeton.cs.algorithms.SuffixArray
-
Returns the ith smallest suffix as a string.
- select(int) - Method in class edu.princeton.cs.algorithms.SuffixArrayX
-
Returns the ith smallest suffix as a string.
- Selection - Class in edu.princeton.cs.algorithms
-
The Selection class provides static methods for sorting an
array using selection sort.
- SeparateChainingHashST<Key,Value> - Class in edu.princeton.cs.algorithms
-
Compilation: javac SeparateChainingHashST.java
Execution: java SeparateChainingHashST
A symbol table implemented with a separate-chaining hash table.
- SeparateChainingHashST() - Constructor for class edu.princeton.cs.algorithms.SeparateChainingHashST
-
- SeparateChainingHashST(int) - Constructor for class edu.princeton.cs.algorithms.SeparateChainingHashST
-
- SequentialSearchST<Key,Value> - Class in edu.princeton.cs.algorithms
-
The SequentialSearchST class represents an (unordered)
symbol table of generic key-value pairs.
- SequentialSearchST() - Constructor for class edu.princeton.cs.algorithms.SequentialSearchST
-
Initializes an empty symbol table.
- SET<Key extends Comparable<Key>> - Class in edu.princeton.cs.algorithms
-
The SET class represents an ordered set of comparable keys.
- SET() - Constructor for class edu.princeton.cs.algorithms.SET
-
Initializes an empty set.
- Shell - Class in edu.princeton.cs.algorithms
-
The Shell class provides static methods for sorting an
array using Shellsort with Knuth's increment sequence (1, 4, 13, 40, ...).
- show(Complex[], String) - Static method in class edu.princeton.cs.algorithms.FFT
-
- show() - Method in class edu.princeton.cs.algorithms.Simplex
-
- shuffle(Object[]) - Static method in class edu.princeton.cs.algorithms.Knuth
-
Rearranges an array of objects in uniformly random order
(under the assumption that Math.random() generates independent
and uniformly distributed numbers between 0 and 1).
- simple(int, int) - Static method in class edu.princeton.cs.algorithms.DigraphGenerator
-
Returns a random simple digraph containing V vertices and E edges.
- simple(int, double) - Static method in class edu.princeton.cs.algorithms.DigraphGenerator
-
Returns a random simple digraph on V vertices, with an
edge between any two vertices with probability p.
- simple(int, int) - Static method in class edu.princeton.cs.algorithms.GraphGenerator
-
Returns a random simple graph containing V vertices and E edges.
- simple(int, double) - Static method in class edu.princeton.cs.algorithms.GraphGenerator
-
Returns a random simple graph on V vertices, with an
edge between any two vertices with probability p.
- Simplex - Class in edu.princeton.cs.algorithms
-
Compilation: javac Simplex.java
Execution: java Simplex
Given an M-by-N matrix A, an M-length vector b, and an
N-length vector c, solve the LP { max cx : Ax <= b, x >= 0 }.
- Simplex(double[][], double[], double[]) - Constructor for class edu.princeton.cs.algorithms.Simplex
-
- simulate(double) - Method in class edu.princeton.cs.algorithms.CollisionSystem
-
Event based simulation for limit seconds
- sin() - Method in class edu.princeton.cs.algorithms.Complex
-
- size() - Method in class edu.princeton.cs.algorithms.Bag
-
Returns the number of items in this bag.
- size() - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- size(Key, Key) - Method in class edu.princeton.cs.algorithms.BinarySearchST
-
- size() - Method in class edu.princeton.cs.algorithms.BST
-
- size(Key, Key) - Method in class edu.princeton.cs.algorithms.BST
-
- size() - Method in class edu.princeton.cs.algorithms.BTree
-
- size(int) - Method in class edu.princeton.cs.algorithms.CC
-
Returns the number of vertices in the connected component containing vertex v.
- size() - Method in class edu.princeton.cs.algorithms.IndexMaxPQ
-
Returns the number of keys on the priority queue.
- size() - Method in class edu.princeton.cs.algorithms.IndexMinPQ
-
Returns the number of keys on the priority queue.
- size() - Method in class edu.princeton.cs.algorithms.LinearProbingHashST
-
- size() - Method in class edu.princeton.cs.algorithms.LinkedBag
-
Returns the number of items in this bag.
- size() - Method in class edu.princeton.cs.algorithms.LinkedQueue
-
Returns the number of items in this queue.
- size() - Method in class edu.princeton.cs.algorithms.LinkedStack
-
Returns the number of items in the stack.
- size() - Method in class edu.princeton.cs.algorithms.MaxPQ
-
Returns the number of keys on the priority queue.
- size() - Method in class edu.princeton.cs.algorithms.MinPQ
-
Returns the number of keys on the priority queue.
- size() - Method in class edu.princeton.cs.algorithms.Queue
-
Returns the number of items in this queue.
- size() - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
Size methods
- size(Key, Key) - Method in class edu.princeton.cs.algorithms.RedBlackBST
-
- size() - Method in class edu.princeton.cs.algorithms.ResizingArrayBag
-
Returns the number of items in this bag.
- size() - Method in class edu.princeton.cs.algorithms.ResizingArrayQueue
-
Returns the number of items in this queue.
- size() - Method in class edu.princeton.cs.algorithms.ResizingArrayStack
-
Returns the number of items in the stack.
- size() - Method in class edu.princeton.cs.algorithms.SeparateChainingHashST
-
- size() - Method in class edu.princeton.cs.algorithms.SequentialSearchST
-
Returns the number of key-value pairs in this symbol table.
- size() - Method in class edu.princeton.cs.algorithms.SET
-
Returns the number of keys in the set.
- size() - Method in class edu.princeton.cs.algorithms.SparseVector
-
- size() - Method in class edu.princeton.cs.algorithms.ST
-
Returns the number of key-value pairs in this symbol table.
- size() - Method in class edu.princeton.cs.algorithms.Stack
-
Returns the number of items in the stack.
- size() - Method in class edu.princeton.cs.algorithms.TrieSET
-
Returns the number of strings in the set.
- size() - Method in class edu.princeton.cs.algorithms.TrieST
-
Returns the number of key-value pairs in this symbol table.
- size() - Method in class edu.princeton.cs.algorithms.TST
-
- slope() - Method in class edu.princeton.cs.algorithms.LinearRegression
-
Returns the slope β of the best of the best-fit line y = α + β x.
- slopeStdErr() - Method in class edu.princeton.cs.algorithms.LinearRegression
-
Returns the standard error of the estimate for the slope.
- sol(int) - Method in class edu.princeton.cs.algorithms.AssignmentProblem
-
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.Heap
-
Rearranges the array in ascending order, using the natural order.
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.Insertion
-
Rearranges the array in ascending order, using the natural order.
- sort(Object[], Comparator) - Static method in class edu.princeton.cs.algorithms.Insertion
-
Rearranges the array in ascending order, using a comparator.
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.InsertionX
-
Rearranges the array in ascending order, using the natural order.
- sort(String[], int) - Static method in class edu.princeton.cs.algorithms.LSD
-
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.Merge
-
Rearranges the array in ascending order, using the natural order.
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.MergeBU
-
Rearranges the array in ascending order, using the natural order.
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.MergeX
-
Rearranges the array in ascending order, using the natural order.
- sort(String[]) - Static method in class edu.princeton.cs.algorithms.MSD
-
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.Quick
-
Rearranges the array in ascending order, using the natural order.
- sort(String[]) - Static method in class edu.princeton.cs.algorithms.Quick3string
-
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.Quick3way
-
Rearranges the array in ascending order, using the natural order.
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.QuickX
-
Rearranges the array in ascending order, using the natural order.
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.Selection
-
Rearranges the array in ascending order, using the natural order.
- sort(Object[], Comparator) - Static method in class edu.princeton.cs.algorithms.Selection
-
Rearranges the array in ascending order, using a comparator.
- sort(Comparable[]) - Static method in class edu.princeton.cs.algorithms.Shell
-
Rearranges the array in ascending order, using the natural order.
- SparseVector - Class in edu.princeton.cs.algorithms
-
Compilation: javac SparseVector.java
Execution: java SparseVector
A sparse vector, implementing using a symbol table.
- SparseVector(int) - Constructor for class edu.princeton.cs.algorithms.SparseVector
-
- ST<Key extends Comparable<Key>,Value> - Class in edu.princeton.cs.algorithms
-
The ST class represents an ordered symbol table of generic
key-value pairs.
- ST() - Constructor for class edu.princeton.cs.algorithms.ST
-
Initializes an empty symbol table.
- Stack<Item> - Class in edu.princeton.cs.algorithms
-
The Stack class represents a last-in-first-out (LIFO) stack of generic items.
- Stack() - Constructor for class edu.princeton.cs.algorithms.Stack
-
Initializes an empty stack.
- star(int) - Static method in class edu.princeton.cs.algorithms.GraphGenerator
-
Returns a star graph on V vertices.
- StaticSETofInts - Class in edu.princeton.cs.algorithms
-
The StaticSETofInts class represents a set of integers.
- StaticSETofInts(int[]) - Constructor for class edu.princeton.cs.algorithms.StaticSETofInts
-
Initializes a set of integers specified by the integer array.
- Stopwatch - Class in edu.princeton.cs.algorithms
-
The Stopwatch data type is for measuring
the time that elapses between the start and end of a
programming task (wall-clock time).
- Stopwatch() - Constructor for class edu.princeton.cs.algorithms.Stopwatch
-
Initialize a stopwatch object.
- StopwatchCPU - Class in edu.princeton.cs.algorithms
-
The StopwatchCPU data type is for measuring
the CPU time used during a programming task.
- StopwatchCPU() - Constructor for class edu.princeton.cs.algorithms.StopwatchCPU
-
Initialize a stopwatch object.
- strong(int, int, int) - Static method in class edu.princeton.cs.algorithms.DigraphGenerator
-
Returns a random simple digraph on V vertices, E
edges and (at least) c strong components.
- stronglyConnected(int, int) - Method in class edu.princeton.cs.algorithms.GabowSCC
-
Are vertices v and w in the same strong component?
- stronglyConnected(int, int) - Method in class edu.princeton.cs.algorithms.KosarajuSharirSCC
-
Are vertices v and w in the same strong component?
- stronglyConnected(int, int) - Method in class edu.princeton.cs.algorithms.TarjanSCC
-
Are vertices v and w in the same strong component?
- SuffixArray - Class in edu.princeton.cs.algorithms
-
The SuffixArray class represents a suffix array of a string of
length N.
- SuffixArray(String) - Constructor for class edu.princeton.cs.algorithms.SuffixArray
-
Initializes a suffix array for the given text string.
- SuffixArrayX - Class in edu.princeton.cs.algorithms
-
The SuffixArrayX class represents a suffix array of a string of
length N.
- SuffixArrayX(String) - Constructor for class edu.princeton.cs.algorithms.SuffixArrayX
-
Initializes a suffix array for the given text string.
- SymbolDigraph - Class in edu.princeton.cs.algorithms
-
The SymbolDigraph class represents a digraph, where the
vertex names are arbitrary strings.
- SymbolDigraph(String, String) - Constructor for class edu.princeton.cs.algorithms.SymbolDigraph
-
Initializes a digraph from a file using the specified delimiter.
- SymbolGraph - Class in edu.princeton.cs.algorithms
-
The SymbolGraph class represents an undirected graph, where the
vertex names are arbitrary strings.
- SymbolGraph(String, String) - Constructor for class edu.princeton.cs.algorithms.SymbolGraph
-
Initializes a graph from a file using the specified delimiter.
- tally() - Method in class edu.princeton.cs.algorithms.Counter
-
Returns the current count.
- tan() - Method in class edu.princeton.cs.algorithms.Complex
-
- TarjanSCC - Class in edu.princeton.cs.algorithms
-
The TarjanSCC class represents a data type for
determining the strong components in a digraph.
- TarjanSCC(Digraph) - Constructor for class edu.princeton.cs.algorithms.TarjanSCC
-
Computes the strong components of the digraph G.
- test(double[][], double[], double[]) - Static method in class edu.princeton.cs.algorithms.Simplex
-
- test1() - Static method in class edu.princeton.cs.algorithms.Simplex
-
- test2() - Static method in class edu.princeton.cs.algorithms.Simplex
-
- test3() - Static method in class edu.princeton.cs.algorithms.Simplex
-
- test4() - Static method in class edu.princeton.cs.algorithms.Simplex
-
- theta() - Method in class edu.princeton.cs.algorithms.Point2D
-
Returns the angle of this point in polar coordinates.
- ThreeSum - Class in edu.princeton.cs.algorithms
-
The ThreeSum class provides static methods for counting
and printing the number of triples in an array of integers that sum to 0
(ignoring integer overflow).
- ThreeSum() - Constructor for class edu.princeton.cs.algorithms.ThreeSum
-
- ThreeSumFast - Class in edu.princeton.cs.algorithms
-
The ThreeSumFast class provides static methods for counting
and printing the number of triples in an array of distinct integers that
sum to 0 (ignoring integer overflow).
- ThreeSumFast() - Constructor for class edu.princeton.cs.algorithms.ThreeSumFast
-
- times(Complex) - Method in class edu.princeton.cs.algorithms.Complex
-
- times(double) - Method in class edu.princeton.cs.algorithms.Complex
-
- times(double) - Method in class edu.princeton.cs.algorithms.Vector
-
Returns the product of this factor multiplied by the scalar factor: this * factor.
- timeToHit(Particle) - Method in class edu.princeton.cs.algorithms.Particle
-
- timeToHitHorizontalWall() - Method in class edu.princeton.cs.algorithms.Particle
-
- timeToHitVerticalWall() - Method in class edu.princeton.cs.algorithms.Particle
-
- timeTrial(int) - Static method in class edu.princeton.cs.algorithms.DoublingRatio
-
Returns the amount of time to call ThreeSum.count() with N
random 6-digit integers.
- timeTrial(int) - Static method in class edu.princeton.cs.algorithms.DoublingTest
-
Returns the amount of time to call ThreeSum.count() with N
random 6-digit integers.
- to() - Method in class edu.princeton.cs.algorithms.DirectedEdge
-
Returns the head vertex of the directed edge.
- to() - Method in class edu.princeton.cs.algorithms.FlowEdge
-
Returns the head vertex of the edge.
- toChar(int) - Method in class edu.princeton.cs.algorithms.Alphabet
-
- toChars(int[]) - Method in class edu.princeton.cs.algorithms.Alphabet
-
- toIndex(char) - Method in class edu.princeton.cs.algorithms.Alphabet
-
- toIndices(String) - Method in class edu.princeton.cs.algorithms.Alphabet
-
- TopM - Class in edu.princeton.cs.algorithms
-
The TopM class provides a client that reads a sequence of
transactions from standard input and prints the M largest ones
to standard output.
- Topological - Class in edu.princeton.cs.algorithms
-
The Topological class represents a data type for
determining a topological order of a directed acyclic graph (DAG).
- Topological(Digraph) - Constructor for class edu.princeton.cs.algorithms.Topological
-
Determines whether the digraph G has a topological order and, if so,
finds such a topological order.
- Topological(EdgeWeightedDigraph) - Constructor for class edu.princeton.cs.algorithms.Topological
-
Determines whether the edge-weighted digraph G has a topological
order and, if so, finds such an order.
- toString() - Method in class edu.princeton.cs.algorithms.AdjMatrixEdgeWeightedDigraph
-
Returns a string representation of the edge-weighted digraph.
- toString() - Method in class edu.princeton.cs.algorithms.BTree
-
- toString() - Method in class edu.princeton.cs.algorithms.Complex
-
- toString() - Method in class edu.princeton.cs.algorithms.Counter
-
Returns a string representation of this counter
- toString() - Method in class edu.princeton.cs.algorithms.Date
-
Return a string representation of this date.
- toString() - Method in class edu.princeton.cs.algorithms.Digraph
-
Returns a string representation of the graph.
- toString() - Method in class edu.princeton.cs.algorithms.DirectedEdge
-
Returns a string representation of the directed edge.
- toString() - Method in class edu.princeton.cs.algorithms.Edge
-
Returns a string representation of the edge.
- toString() - Method in class edu.princeton.cs.algorithms.EdgeWeightedDigraph
-
Returns a string representation of the edge-weighted digraph.
- toString() - Method in class edu.princeton.cs.algorithms.EdgeWeightedGraph
-
Returns a string representation of the edge-weighted graph.
- toString() - Method in class edu.princeton.cs.algorithms.FlowEdge
-
Returns a string representation of the edge.
- toString() - Method in class edu.princeton.cs.algorithms.FlowNetwork
-
Returns a string representation of the flow network.
- toString() - Method in class edu.princeton.cs.algorithms.Graph
-
Returns a string representation of the graph.
- toString() - Method in class edu.princeton.cs.algorithms.Interval1D
-
Returns a string representation of this interval.
- toString() - Method in class edu.princeton.cs.algorithms.Interval2D
-
Returns a string representation of this two-dimensional interval.
- toString() - Method in class edu.princeton.cs.algorithms.LinearRegression
-
Returns a string representation of the simple linear regression model.
- toString() - Method in class edu.princeton.cs.algorithms.LinkedQueue
-
Returns a string representation of this queue.
- toString() - Method in class edu.princeton.cs.algorithms.LinkedStack
-
Returns a string representation of this stack.
- toString() - Method in class edu.princeton.cs.algorithms.Point2D
-
Return a string representation of this point.
- toString() - Method in class edu.princeton.cs.algorithms.PolynomialRegression
-
Returns a string representation of the polynomial regression model.
- toString() - Method in class edu.princeton.cs.algorithms.Queue
-
Returns a string representation of this queue.
- toString() - Method in class edu.princeton.cs.algorithms.SET
-
Returns a string representation of this set.
- toString() - Method in class edu.princeton.cs.algorithms.SparseVector
-
- toString() - Method in class edu.princeton.cs.algorithms.Stack
-
Returns a string representation of this stack.
- toString() - Method in class edu.princeton.cs.algorithms.Transaction
-
Returns a string representation of the transaction.
- toString() - Method in class edu.princeton.cs.algorithms.Vector
-
Returns a string representation of this vector.
- tournament(int) - Static method in class edu.princeton.cs.algorithms.DigraphGenerator
-
Returns a random tournament digraph on V vertices.
- Transaction - Class in edu.princeton.cs.algorithms
-
The Transaction class is an immutable data type to encapsulate a
commercial transaction with a customer name, date, and amount.
- Transaction(String, Date, double) - Constructor for class edu.princeton.cs.algorithms.Transaction
-
Initializes a new transaction from the given arguments.
- Transaction(String) - Constructor for class edu.princeton.cs.algorithms.Transaction
-
Initializes a new transaction by parsing a string of the form NAME DATE AMOUNT.
- Transaction.HowMuchOrder - Class in edu.princeton.cs.algorithms
-
Compares two transactions by amount.
- Transaction.HowMuchOrder() - Constructor for class edu.princeton.cs.algorithms.Transaction.HowMuchOrder
-
- Transaction.WhenOrder - Class in edu.princeton.cs.algorithms
-
Compares two transactions by date.
- Transaction.WhenOrder() - Constructor for class edu.princeton.cs.algorithms.Transaction.WhenOrder
-
- Transaction.WhoOrder - Class in edu.princeton.cs.algorithms
-
Compares two transactions by customer name.
- Transaction.WhoOrder() - Constructor for class edu.princeton.cs.algorithms.Transaction.WhoOrder
-
- TransitiveClosure - Class in edu.princeton.cs.algorithms
-
The TransitiveClosure class represents a data type for
computing the transitive closure of a digraph.
- TransitiveClosure(Digraph) - Constructor for class edu.princeton.cs.algorithms.TransitiveClosure
-
Computes the transitive closure of the digraph G.
- tree(int) - Static method in class edu.princeton.cs.algorithms.GraphGenerator
-
Returns a uniformly random tree on V vertices.
- TrieSET - Class in edu.princeton.cs.algorithms
-
The TrieSET class represents an ordered set of strings over
the extended ASCII alphabet.
- TrieSET() - Constructor for class edu.princeton.cs.algorithms.TrieSET
-
Initializes an empty set of strings.
- TrieST<Value> - Class in edu.princeton.cs.algorithms
-
The TrieST class represents an symbol table of key-value
pairs, with string keys and generic values.
- TrieST() - Constructor for class edu.princeton.cs.algorithms.TrieST
-
- TST<Value> - Class in edu.princeton.cs.algorithms
-
Compilation: javac TST.java
Execution: java TST < words.txt
Dependencies: StdIn.java
Symbol table with string keys, implemented using a ternary search
trie (TST).
- TST() - Constructor for class edu.princeton.cs.algorithms.TST
-