A B C D E F G H I K L M N O P Q R S T U V W X Y 

A

abs() - Method in class Complex
 
AcyclicLP - Class in <Unnamed>
Esta classe implementa um ADT para resolver o problema dos caminhos de peso máximo em um dag (digrafo acíclico) com pesos nos arcos.
AcyclicLP(EdgeWeightedDigraph, int) - Constructor for class AcyclicLP
Calcula uma arborescência de caminhos de pseso máximo, com raiz s, no dag G.
AcyclicSP - Class in <Unnamed>
Esta classe implementa um ADT para resolver o problema dos caminhos de peso mínimo em um dag (digrafo acíclico) com pesos nos arcos.
AcyclicSP(EdgeWeightedDigraph, int) - Constructor for class AcyclicSP
Apartir da raiz s, calcula uma arborescência de caminhos de peso mínimo no dag G.
add(Item) - Method in class Bag
Adds the item to this bag.
add(Item) - Method in class LinkedBag
Adds the item to this bag.
add(Item) - Method in class ResizingArrayBag
Adds the item to this bag.
add(Key) - Method in class SET
Adds the key to the set if it is not already present.
addEdge(DirectedEdge) - Method in class AdjMatrixEdgeWeightedDigraph
 
addEdge(int, int) - Method in class Digraph
Add the directed edge v->w to the digraph.
addEdge(DirectedEdge) - Method in class EdgeWeightedDigraph
Add the directed edge e to this digraph.
addEdge(Edge) - Method in class EdgeWeightedGraph
Add the undirected edge e to this graph.
addEdge(FlowEdge) - Method in class FlowNetwork
 
addEdge(int, int) - Method in class Graph
Adds the undirected edge v-w to this graph.
addResidualFlowTo(int, double) - Method in class FlowEdge
 
adj(int) - Method in class AdjMatrixEdgeWeightedDigraph
 
adj(int) - Method in class Digraph
Return the list of vertices pointed to from vertex v as an Iterable.
adj(int) - Method in class EdgeWeightedDigraph
Return the edges incident from vertex v as an Iterable.
adj(int) - Method in class EdgeWeightedGraph
Return the edges incident to vertex v as an Iterable.
adj(int) - Method in class FlowNetwork
 
adj(int) - Method in class Graph
Returns the vertices adjacent to vertex v.
AdjMatrixEdgeWeightedDigraph - Class in <Unnamed>
 
AdjMatrixEdgeWeightedDigraph(int) - Constructor for class AdjMatrixEdgeWeightedDigraph
 
AdjMatrixEdgeWeightedDigraph(int, int) - Constructor for class AdjMatrixEdgeWeightedDigraph
 
Alphabet - Class in <Unnamed>
This is a library of methods to handle different alphabets.
Alphabet(String) - Constructor for class Alphabet
Constructor 1.
Alphabet() - Constructor for class Alphabet
Constructor 2 (extended ASCII).
amount() - Method in class Transaction
Returns the amount of the transaction.
Arbitrage - Class in <Unnamed>
The Arbitrage class detects currency arbitrage opportunities (i.e., detect a negative cycle in the complete digraph representing the exchanges between currencies).
area() - Method in class Interval2D
Returns the area of this two-dimensional interval.
area2(Point2D, Point2D, Point2D) - Static method in class Point2D
Returns twice the signed area of the triangle a-b-c.
areConnected(int, int) - Method in class CC
Are vertices v and w in the same connected component?
ASCII - Static variable in class Alphabet
This is the 128-character ASCII alphabet.
AssignmentProblem - Class in <Unnamed>
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 AssignmentProblem
 
ATAN2_ORDER - Variable in class Point2D
Compares two points by atan2() angle (between -pi and pi) with respect to this point.
Average - Class in <Unnamed>
The Average class provides a client for reading in a sequence of real numbers and printing out their average.

B

Bag<Item> - Class in <Unnamed>
Esta classe implementa um saco (bag) de itens genéricos, não necessariamente todos diferentes.
Bag() - Constructor for class Bag
Creates an empty bag.
BASE64 - Static variable in class Alphabet
This is the 64-letter alphabet {A,B,..,Z,a,b,..,z,0,1,..,9,+,/}.
BellmanFordSP - Class in <Unnamed>
Compilation: javac BellmanFordSP.java Execution: java BellmanFordSP filename.txt s Dependencies: EdgeWeightedDigraph.java DirectedEdge.java Queue.java EdgeWeightedDirectedCycle.java Data files: http://algs4.cs.princeton.edu/44sp/tinyEWDn.txt http://algs4.cs.princeton.edu/44sp/mediumEWDnc.txt Bellman-Ford shortest path algorithm.
BellmanFordSP(EdgeWeightedDigraph, int) - Constructor for class BellmanFordSP
 
beta(int) - Method in class PolynomialRegression
Returns the jth regression coefficient
BINARY - Static variable in class Alphabet
This is the alphabet {0,1}.
BinaryDump - Class in <Unnamed>
This program prints a bitstream representing 0 bits by '0' chars and 1 bits '1' chars.
BinaryDump() - Constructor for class BinaryDump
 
BinarySearch - Class in <Unnamed>
The BinarySearch class provides a static method for binary searching for an integer in a sorted array of integers.
BinarySearchST<Key extends java.lang.Comparable<Key>,Value> - Class in <Unnamed>
This is an implementation of a symbol table whose keys are comparable.
BinarySearchST() - Constructor for class BinarySearchST
Costructor.
BinarySearchST(int) - Constructor for class BinarySearchST
Costructor.
binaryTree(int) - Static method in class DigraphGenerator
 
binaryTree(int) - Static method in class GraphGenerator
Returns a complete binary tree graph on V vertices.
Bipartite - Class in <Unnamed>
The Bipartite class represents a data type for determining whether an undirected graph is bipartite or whether it has an odd-length cycle.
Bipartite(Graph) - Constructor for class Bipartite
Determines whether an undirected graph is bipartite and finds either a bipartition or an odd-length cycle.
bipartite(int, int, int) - Static method in class GraphGenerator
Returns a random simple bipartite graph on V1 and V2 vertices with E edges.
bipartite(int, int, double) - Static method in class GraphGenerator
Returns a random simple bipartite graph on V1 and V2 vertices, containing each possible edge with probability p.
BipartiteMatching - Class in <Unnamed>
Compilation: javac BipartiteMatching.java Execution: java BipartiteMatching N E Dependencies: FordFulkerson.java FlowNetwork.java FlowEdge.java Find a maximum matching in a bipartite graph.
BipartiteMatching() - Constructor for class BipartiteMatching
 
BlackFilter - Class in <Unnamed>
This application program reads in a blacklist of words from a file.
BoruvkaMST - Class in <Unnamed>
Compilation: javac BoruvkaMST.java Execution: java BoruvkaMST filename.txt Dependencies: EdgeWeightedGraph.java Edge.java Bag.java UF.java In.java StdOut.java Data files: http://algs4.cs.princeton.edu/43mst/tinyEWG.txt http://algs4.cs.princeton.edu/43mst/mediumEWG.txt http://algs4.cs.princeton.edu/43mst/largeEWG.txt Compute a minimum spanning forest using Boruvka's algorithm.
BoruvkaMST(EdgeWeightedGraph) - Constructor for class BoruvkaMST
 
bounceOff(Particle) - Method in class Particle
 
bounceOffHorizontalWall() - Method in class Particle
 
bounceOffVerticalWall() - Method in class Particle
 
BoyerMoore - Class in <Unnamed>
Compilation: javac BoyerMoore.java Execution: java BoyerMoore pattern text Reads in two strings, the pattern and the input text, and searches for the pattern in the input text using the bad-character rule part of the Boyer-Moore algorithm.
BoyerMoore(String) - Constructor for class BoyerMoore
 
BoyerMoore(char[], int) - Constructor for class BoyerMoore
 
BreadthFirstDirectedPaths - Class in <Unnamed>
The BreadthDirectedFirstPaths class represents a data type for finding shortest paths (number of edges) from a source vertex s (or set of source vertices) to every other vertex in the digraph.
BreadthFirstDirectedPaths(Digraph, int) - Constructor for class BreadthFirstDirectedPaths
Computes the shortest path from s and every other vertex in graph G.
BreadthFirstDirectedPaths(Digraph, Iterable<Integer>) - Constructor for class BreadthFirstDirectedPaths
Computes the shortest path from any one of the source vertices in sources to every other vertex in graph G.
BreadthFirstPaths - Class in <Unnamed>
The BreadthFirstPaths class represents a data type for finding shortest paths (number of edges) from a source vertex s (or a set of source vertices) to every other vertex in an undirected graph.
BreadthFirstPaths(Graph, int) - Constructor for class BreadthFirstPaths
Computes the shortest path between s and every other vertex in graph G.
BreadthFirstPaths(Graph, Iterable<Integer>) - Constructor for class BreadthFirstPaths
Computes the shortest path between any one of the source vertices in sources and every other vertex in graph G.
BST<Key extends java.lang.Comparable<Key>,Value> - Class in <Unnamed>
This is an implementation of a symbol table whose keys are comparable.
BST() - Constructor for class BST
 
BTree<Key extends java.lang.Comparable<Key>,Value> - Class in <Unnamed>
Compilation: javac BTree.java Execution: java BTree B-tree.
BTree() - Constructor for class BTree
 

C

capacity() - Method in class FlowEdge
 
cartesian(int) - Method in class Vector
Returns the ith cartesian coordinate.
Cat - Class in <Unnamed>
The Cat class provides a client for concatenating the results of several text files.
CC - Class in <Unnamed>
The CC class represents a data type for determining the connected components in an undirected graph.
CC(Graph) - Constructor for class CC
Computes the connected components of the undirected graph G.
cconvolve(Complex[], Complex[]) - Static method in class FFT
 
ccw(Point2D, Point2D, Point2D) - Static method in class Point2D
Is a->b->c a counterclockwise turn?
ceil(Key) - Method in class SET
Returns the smallest key in the set greater than or equal to key.
ceil(Key) - Method in class ST
Returns the smallest key in the symbol table greater than or equal to key.
ceiling(Key) - Method in class BinarySearchST
Returns the smallest key that is greater than or equal to the given key.
ceiling(Key) - Method in class BST
 
ceiling(Key) - Method in class RedBlackBST
 
change(int, Key) - Method in class IndexMaxPQ
Deprecated.
Replaced by changeKey()
change(int, Key) - Method in class IndexMinPQ
Deprecated.
Replaced by changeKey()
changeKey(int, Key) - Method in class IndexMaxPQ
Change the key associated with index i to the specified value.
changeKey(int, Key) - Method in class IndexMinPQ
Change the key associated with index i to the specified value.
ClosestPair - Class in <Unnamed>
Given N points in the plane, find the closest pair in N log N time.
Note: could speed it up by comparing square of Euclidean distances instead of Euclidean distances.
ClosestPair(Point2D[]) - Constructor for class ClosestPair
 
collect(TrieST.Node, String, String, Queue<String>) - Method in class TrieST
Adds to the queue q all the keys in the trie that have the given prefix and match pattern pat (Assumes that prefix.length() <= pat.length().)
collect(TST<Value>.Node, String, int, String, Queue<String>) - Method in class TST
 
CollisionSystem - Class in <Unnamed>
 
CollisionSystem(Particle[]) - Constructor for class CollisionSystem
 
color(int) - Method in class Bipartite
Returns the side of the bipartite that vertex v is on.
compare(Transaction, Transaction) - Method in class Transaction.HowMuchOrder
 
compare(Transaction, Transaction) - Method in class Transaction.WhenOrder
 
compare(Transaction, Transaction) - Method in class Transaction.WhoOrder
 
compareTo(Counter) - Method in class Counter
Compares the value of this counter to the value of that counter.
compareTo(Date) - Method in class Date
Compara esta data com that.
compareTo(Edge) - Method in class Edge
Compare edges by weight.
compareTo(Point2D) - Method in class Point2D
Compares this point to that point by y-coordinate, breaking ties by x-coordinate.
compareTo(Transaction) - Method in class Transaction
Compares this transaction to that transaction.
complete(int) - Static method in class DigraphGenerator
 
complete(int) - Static method in class GraphGenerator
Returns the complete graph on V vertices.
completeBipartite(int, int) - Static method in class GraphGenerator
Returns a complete bipartite graph on V1 and V2 vertices.
Complex - Class in <Unnamed>
Compilation: javac Complex.java Execution: java Complex Data type for complex numbers.
Complex(double, double) - Constructor for class Complex
 
compress() - Static method in class Genome
 
compress() - Static method in class Huffman
Compresses the bytestream from standard input and writes the compressed bitstream to standard output.
compress() - Static method in class LZW
 
compress() - Static method in class RunLength
 
conjugate() - Method in class Complex
 
connected(int, int) - Method in class QuickFindUF
Are the two objects p and q in the same component?
connected(int, int) - Method in class QuickUnionUF
Are the two objects p and q in the same component?
connected(int, int) - Method in class UF
Are the two sites p and q in the same component?
connected(int, int) - Method in class WeightedQuickUnionUF
Are the two objects p and q in the same component?
contains(char) - Method in class Alphabet
Is character c in the alphabet?.
contains(Key) - Method in class BinarySearchST
Is the key in this symbol table?
contains(Key) - Method in class BST
Does this symbol table contain a (key,value) pair with the given key?
contains(int) - Method in class IndexMaxPQ
Is i an index on the priority queue?
contains(int) - Method in class IndexMinPQ
Is i an index on the priority queue?
contains(double) - Method in class Interval1D
Does this interval contain the value x?
contains(Point2D) - Method in class Interval2D
Does this two-dimensional interval contain the point p?
contains(Key) - Method in class LinearProbingHashST
 
contains(Key) - Method in class RedBlackBST
Does this symbol table contain a (key,value) pair with the given key?
contains(Key) - Method in class SeparateChainingHashST
 
contains(Key) - Method in class SequentialSearchST
Does this symbol table contain the given key?
contains(Key) - Method in class SET
Does this symbol table contain the given key?
contains(Key) - Method in class ST
Does this symbol table contain the given key?
contains(int) - Method in class StaticSETofInts
Is the key in this set of integers?
contains(String) - Method in class SymbolDigraph
 
contains(String) - Method in class SymbolGraph
 
contains(String) - Method in class TrieST
Is the key in the symbol table? A chave key está na TS?
contains(String) - Method in class TST
Is string key in the symbol table?
convolve(Complex[], Complex[]) - Static method in class FFT
 
cos() - Method in class Complex
 
count() - Method in class CC
Returns the number of connected components.
Count - Class in <Unnamed>
This application program creates an alphabet specified on the command line, reads 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.
This program is a client of the Alphabet ADT.
count() - Method in class DepthFirstSearch
Returns the number of vertices connected to the source vertex s.
count() - Method in class DirectedDFS
Returns the number of vertices reachable from the source vertex (or source vertices).
count() - Method in class GabowSCC
Returns the number of strong components.
count() - Method in class KosarajuSharirSCC
Returns the number of strong components.
count() - Method in class Particle
 
count() - Method in class QuickFindUF
Return the number of components.
count() - Method in class QuickUnionUF
Return the number of components.
count() - Method in class TarjanSCC
Returns the number of strong components.
count(int[]) - Static method in class 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 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 UF
Return the number of components.
count() - Method in class WeightedQuickUnionUF
Return the number of components.
Counter - Class in <Unnamed>
The Counter class is a mutable data type to encapsulate a counter.
Counter(String) - Constructor for class Counter
Initializes a new counter starting at 0, with the given id.
CPM - Class in <Unnamed>
Compilation: javac CPM.java Execution: java CPM < input.txt Dependencies: EdgeWeightedDigraph.java AcyclicDigraphLP.java StdOut.java Data files: http://algs4.cs.princeton.edu/44sp/jobsPC.txt Critical path method.
CPM() - Constructor for class CPM
 
Cycle - Class in <Unnamed>
The Cycle class represents a data type for determining whether an undirected graph has a cycle.
Cycle(Graph) - Constructor for class Cycle
Determines whether the undirected graph G has a cycle and, if so, finds such a cycle.
cycle() - Method in class Cycle
Returns a cycle if the graph has a cycle, and null otherwise.
cycle(int) - Static method in class DigraphGenerator
 
cycle() - Method in class DirectedCycle
Returns a directed cycle if the digraph has a directed cycle, and null otherwise.
cycle() - Method in class EdgeWeightedDirectedCycle
Returns a directed cycle if the edge-weighted digraph has a directed cycle, and null otherwise.
cycle(int) - Static method in class GraphGenerator
Returns a cycle graph on V vertices.

D

dag(int, int) - Static method in class DigraphGenerator
 
Date - Class in <Unnamed>
Esta classe implementa o ADT Date, um tipo de dados imutável que encapsula uma data (dia, mês, e ano).
Date(int, int, int) - Constructor for class Date
Cria uma nova data a partir dos argumento month (mês), day (dia) e year (ano).
Date(String) - Constructor for class Date
Inicializa uma nova data a partir da string date, que tem a forma MM/DD/YYYY.
day() - Method in class Date
Devolve o dia (um inteiro em 1..31) desta data.
DECIMAL - Static variable in class Alphabet
This is the alphabet {0,1,..,9}.
decreaseKey(int, Key) - Method in class IndexMaxPQ
Decrease the key associated with index i to the specified value.
decreaseKey(int, Key) - Method in class IndexMinPQ
Decrease the key associated with index i to the specified value.
DeDup - Class in <Unnamed>
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 DeDup
 
degree() - Method in class PolynomialRegression
Returns the degree of the polynomial to fit
DegreesOfSeparation - Class in <Unnamed>
Compilation: javac DegreesOfSeparation.java Execution: java DegreesOfSeparation filename delimiter source Dependencies: SymbolGraph.java Graph.java BreadthFirstPaths.java StdOut.java Data files: http://algs4.cs.princeton.edu/41undirected/routes.txt http://algs4.cs.princeton.edu/41undirected/movies.txt % java DegreesOfSeparation routes.txt " " "JFK" LAS JFK ORD DEN LAS DFW JFK ORD DFW EWR Not in database.
DegreesOfSeparation() - Constructor for class DegreesOfSeparation
 
delete(Key) - Method in class BinarySearchST
Remove key (and the corresponding value) from this symbol table.
delete(Key) - Method in class BST
Deletes from this symbol table the given key (and the corresponding value).
delete(int) - Method in class IndexMaxPQ
Remove the key associated with index i.
delete(int) - Method in class IndexMinPQ
Remove the key associated with index i.
delete(Key) - Method in class LinearProbingHashST
 
delete(Key) - Method in class RedBlackBST
 
delete(Key) - Method in class SeparateChainingHashST
 
delete(Key) - Method in class SequentialSearchST
Removes the key and associated value from the symbol table if the key is in the symbol table.
delete(Key) - Method in class SET
Removes the key from the set if the key is present.
delete(Key) - Method in class ST
Removes the key and associated value from the symbol table (if the key is in the symbol table).
delete(String) - Method in class TrieST
Deletes from the ST the given key and its associated value.
deleteMax() - Method in class BinarySearchST
Delete the maximum key and its associated value from this symbol table.
deleteMax() - Method in class BST
Deletes the largest key (and the corresponding value) from this symbol table.
deleteMax() - Method in class RedBlackBST
 
deleteMin() - Method in class BinarySearchST
Delete the minimum key and its associated value from this symbol table.
deleteMin() - Method in class BST
Deletes the smallest key (and the corresponding value) from this symbol table.
deleteMin() - Method in class RedBlackBST
Red-black deletion
delMax() - Method in class IndexMaxPQ
Removes a maximum key and returns its associated index.
delMax() - Method in class MaxPQ
Removes and returns a largest key on the priority queue.
delMin() - Method in class IndexMinPQ
Removes a minimum key and returns its associated index.
delMin() - Method in class MinPQ
Removes and returns a smallest key on the priority queue.
DepthFirstDirectedPaths - Class in <Unnamed>
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 DepthFirstDirectedPaths
Computes a directed path from s to every other vertex in digraph G.
DepthFirstOrder - Class in <Unnamed>
This program computes the preorder and postorder of a digraph or edge-weighted digraph (ignoring the weights).
DepthFirstOrder(Digraph) - Constructor for class DepthFirstOrder
Constructor.
DepthFirstOrder(EdgeWeightedDigraph) - Constructor for class DepthFirstOrder
 
DepthFirstPaths - Class in <Unnamed>
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 DepthFirstPaths
Computes a path between s and every other vertex in graph G.
DepthFirstSearch - Class in <Unnamed>
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 DepthFirstSearch
Computes the vertices in graph G that are connected to the source vertex s.
dequeue() - Method in class LinkedQueue
Removes and returns the item on this queue that was least recently added.
dequeue() - Method in class Queue
Removes and returns the item on this queue that was least recently added.
dequeue() - Method in class ResizingArrayQueue
Removes and returns the item on this queue that was least recently added.
Digraph - Class in <Unnamed>
The Digraph class represents an directed graph of vertices named 0 through V-1.
Digraph(int) - Constructor for class Digraph
Create an empty digraph with V vertices.
Digraph(In) - Constructor for class Digraph
Create a digraph from input stream.
Digraph(Digraph) - Constructor for class Digraph
Copy constructor.
DigraphGenerator - Class in <Unnamed>
Compilation: javac DigraphGenerator.java Execution: java DigraphGenerator V E Dependencies: Digraph.java A digraph generator.
DigraphGenerator() - Constructor for class DigraphGenerator
 
DijkstraAllPairsSP - Class in <Unnamed>
Compilation: javac DijkstraAllPairsSP.java Dependencies: EdgeWeightedDigraph.java Dijkstra.java Dijkstra's algorithm run from each vertex.
DijkstraAllPairsSP(EdgeWeightedDigraph) - Constructor for class DijkstraAllPairsSP
 
DijkstraSP - Class in <Unnamed>
Compilation: javac DijkstraSP.java Execution: java DijkstraSP input.txt s Dependencies: EdgeWeightedDigraph.java IndexMinPQ.java Stack.java DirectedEdge.java Data files: http://algs4.cs.princeton.edu/44sp/tinyEWD.txt http://algs4.cs.princeton.edu/44sp/mediumEWD.txt http://algs4.cs.princeton.edu/44sp/largeEWD.txt Dijkstra's algorithm.
DijkstraSP(EdgeWeightedDigraph, int) - Constructor for class DijkstraSP
 
DirectedCycle - Class in <Unnamed>
The DirectedCycle class represents a data type for determining whether a digraph has a directed cycle.
DirectedCycle(Digraph) - Constructor for class DirectedCycle
Determines whether the digraph G has a directed cycle and, if so, finds such a cycle.
DirectedDFS - Class in <Unnamed>
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 DirectedDFS
Computes the vertices in digraph G that are reachable from the source vertex s.
DirectedDFS(Digraph, Iterable<Integer>) - Constructor for class DirectedDFS
Computes the vertices in digraph G that are connected to any of the source vertices sources.
DirectedEdge - Class in <Unnamed>
The DirectedEdge class represents a weighted edge in an directed graph.
DirectedEdge(int, int, double) - Constructor for class DirectedEdge
Create a directed edge from v to w with given weight.
direction() - Method in class Vector
Returns a unit vector in the direction of this vector.
dist(int, int) - Method in class DijkstraAllPairsSP
 
dist(int, int) - Method in class FloydWarshall
 
distance() - Method in class ClosestPair
 
distance() - Method in class FarthestPair
 
DISTANCE_TO_ORDER - Variable in class Point2D
Compares two points by distance to this point.
distanceSquaredTo(Point2D) - Method in class Point2D
Returns the square of the Euclidean distance between this point and that point.
distanceTo(Point2D) - Method in class Point2D
Returns the Euclidean distance between this point and that point.
distanceTo(Vector) - Method in class Vector
Returns the Euclidean distance between this vector and that vector.
distTo(int) - Method in class AcyclicLP
Devolve o comprimento de um caminho de peso máximo do vértice s ao vértice v.
distTo(int) - Method in class AcyclicSP
Devolve o comprimento de um caminho de peso mínimo do vértice s ao vértice v.
distTo(int) - Method in class BellmanFordSP
 
distTo(int) - Method in class BreadthFirstDirectedPaths
Returns the number of edges in a shortest path from the source s (or sources) to vertex v?
distTo(int) - Method in class BreadthFirstPaths
Returns the number of edges in a shortest path between the source s (or sources) and vertex v?
distTo(int) - Method in class DijkstraSP
 
divides(Complex) - Method in class Complex
 
DNA - Static variable in class Alphabet
This is the alphabet {A,C,T,G}.
dot(SparseVector) - Method in class SparseVector
 
dot(double[]) - Method in class SparseVector
 
dot(Vector) - Method in class Vector
Returns the inner product of this vector with that vector.
DoublingRatio - Class in <Unnamed>
The DoublingRatio class provides a client for measuring the running time of a method using a doubling ratio test.
DoublingTest - Class in <Unnamed>
The DoublingTest class provides a client for measuring the running time of a method using a doubling test.
draw() - Method in class Interval2D
Draws this two-dimensional interval to standard draw.
draw() - Method in class Particle
 
draw() - Method in class Point2D
Plot this point using standard draw.
drawTo(Point2D) - Method in class Point2D
Plot a line from this point to that point using standard draw.
dual() - Method in class Simplex
 
dualCol(int) - Method in class AssignmentProblem
 
dualRow(int) - Method in class AssignmentProblem
 

E

E() - Method in class AdjMatrixEdgeWeightedDigraph
 
E() - Method in class Digraph
Return the number of edges in the digraph.
E() - Method in class EdgeWeightedDigraph
Return the number of edges in this digraph.
E() - Method in class EdgeWeightedGraph
Return the number of edges in this graph.
E() - Method in class FlowNetwork
 
E() - Method in class Graph
Returns the number of edges in this graph.
Edge - Class in <Unnamed>
The Edge class represents a weighted edge in an undirected graph.
Edge(int, int, double) - Constructor for class Edge
Create an edge between v and w with given weight.
edges() - Method in class BoruvkaMST
 
edges() - Method in class EdgeWeightedDigraph
Return all edges in this digraph as an Iterable.
edges() - Method in class EdgeWeightedGraph
Return all edges in this graph as an Iterable.
edges() - Method in class FlowNetwork
 
edges() - Method in class KruskalMST
 
edges() - Method in class LazyPrimMST
 
edges() - Method in class PrimMST
 
EdgeWeightedDigraph - Class in <Unnamed>
The EdgeWeightedDigraph class represents an directed graph of vertices named 0 through V-1, where each edge has a real-valued weight.
EdgeWeightedDigraph(int) - Constructor for class EdgeWeightedDigraph
Create an empty edge-weighted digraph with V vertices.
EdgeWeightedDigraph(int, int) - Constructor for class EdgeWeightedDigraph
Create a edge-weighted digraph with V vertices and E edges.
EdgeWeightedDigraph(In) - Constructor for class EdgeWeightedDigraph
Create an edge-weighted digraph from input stream.
EdgeWeightedDigraph(EdgeWeightedDigraph) - Constructor for class EdgeWeightedDigraph
Copy constructor.
EdgeWeightedDirectedCycle - Class in <Unnamed>
The EdgeWeightedDirectedCycle class represents a data type for determining whether an edge-weighted digraph has a directed cycle.
EdgeWeightedDirectedCycle(EdgeWeightedDigraph) - Constructor for class EdgeWeightedDirectedCycle
Determines whether the edge-weighted digraph G has a directed cycle and, if so, finds such a cycle.
EdgeWeightedGraph - Class in <Unnamed>
The EdgeWeightedGraph class represents an undirected graph of vertices named 0 through V-1, where each edge has a real-valued weight.
EdgeWeightedGraph(int) - Constructor for class EdgeWeightedGraph
Create an empty edge-weighted graph with V vertices.
EdgeWeightedGraph(int, int) - Constructor for class EdgeWeightedGraph
Create a random edge-weighted graph with V vertices and E edges.
EdgeWeightedGraph(In) - Constructor for class EdgeWeightedGraph
Create a weighted graph from input stream.
EdgeWeightedGraph(EdgeWeightedGraph) - Constructor for class EdgeWeightedGraph
Copy constructor.
either() - Method in class ClosestPair
 
either() - Method in class Edge
Return either endpoint of this edge.
either() - Method in class FarthestPair
 
elapsedTime() - Method in class Stopwatch
Return elapsed time (in seconds) since this object was created.
enqueue(Item) - Method in class LinkedQueue
Adds the item to this queue.
enqueue(Item) - Method in class Queue
Adds item to this queue.
enqueue(Item) - Method in class ResizingArrayQueue
Adds the item to this queue.
equals(Object) - Method in class Date
Esta data é igual a xx?
equals(Object) - Method in class Point2D
Does this point equal y?
equals(Object) - Method in class SET
Does this set equal y? Note that this method declares two empty sets to be equal even if they are parameterized by different generic types.
equals(Object) - Method in class Transaction
Is this transaction equal to x?
exp() - Method in class Complex
 
expand() - Static method in class Genome
 
expand() - Static method in class Huffman
Expands the encoded bitstream from standard input and writes the decoded bytestream to standard output.
expand() - Static method in class LZW
 
expand() - Static method in class RunLength
 
EXTENDED_ASCII - Static variable in class Alphabet
This is the 256-character extended ASCII alphabet.

F

FarthestPair - Class in <Unnamed>
Compilation: javac FarthestPair.java Execution: java FarthestPair < input.txt Dependencies: GrahamScan.java Point2D.java Given a set of N points in the plane, find the farthest pair (equivalently, compute the diameter of the set of points).
FarthestPair(Point2D[]) - Constructor for class FarthestPair
 
FFT - Class in <Unnamed>
Compilation: javac FFT.java Execution: java FFT N Dependencies: Complex.java Compute the FFT and inverse FFT of a length N complex sequence.
FFT() - Constructor for class FFT
 
fft(Complex[]) - Static method in class FFT
 
FileIndex - Class in <Unnamed>
 
FileIndex() - Constructor for class FileIndex
 
find(int) - Method in class QuickFindUF
Return the component identifier for the component containing object p.
find(int) - Method in class QuickUnionUF
Return the component identifier for the component containing object p.
find(int) - Method in class UF
Return the component identifier for the component containing site p.
find(int) - Method in class WeightedQuickUnionUF
Return the component identifier for the component containing object p.
floor(Key) - Method in class BinarySearchST
Returns the greatest key that is smaller than or equal to the given key.
floor(Key) - Method in class BST
Returns the largest key in the symbol table that is smaller than or equal to the given key.
floor(Key) - Method in class RedBlackBST
 
floor(Key) - Method in class SET
Returns the largest key in the set less than or equal to key.
floor(Key) - Method in class ST
Returns the largest key in the symbol table less than or equal to key.
flow() - Method in class FlowEdge
 
FlowEdge - Class in <Unnamed>
The FlowEdge class represents a capacitated edge with a flow in a digraph.
FlowEdge(int, int, double) - Constructor for class FlowEdge
 
FlowEdge(int, int, double, double) - Constructor for class FlowEdge
 
FlowEdge(FlowEdge) - Constructor for class FlowEdge
 
FlowNetwork - Class in <Unnamed>
Compilation: javac FlowNetwork.java Execution: java FlowNetwork V E Dependencies: Bag.java FlowEdge.java A capacitated flow network, implemented using adjacency lists.
FlowNetwork(int) - Constructor for class FlowNetwork
 
FlowNetwork(int, int) - Constructor for class FlowNetwork
 
FlowNetwork(In) - Constructor for class FlowNetwork
 
FloydWarshall - Class in <Unnamed>
Compilation: javac FloydWarshall.java Execution: java FloydWarshall V E Dependencies: AdjMatrixEdgeWeightedDigraph.java Floyd-Warshall all-pairs shortest path algorithm.
FloydWarshall(AdjMatrixEdgeWeightedDigraph) - Constructor for class FloydWarshall
 
FordFulkerson - Class in <Unnamed>
Compilation: javac FordFulkerson.java Execution: java FordFulkerson V E Dependencies: FlowNetwork.java FlowEdge.java Queue.java Ford-Fulkerson algorithm for computing a max flow and a min cut using shortest augmenting path rule.
FordFulkerson(FlowNetwork, int, int) - Constructor for class FordFulkerson
 
FrequencyCounter - Class in <Unnamed>
The FrequencyCounter class provides a client for reading in a sequence of words and printing a word (exceeding a given length) that occurs most frequently.
FrequencyCounter() - Constructor for class FrequencyCounter
 
from() - Method in class DirectedEdge
Return the vertex where this edge begins.
from() - Method in class FlowEdge
 

G

G() - Method in class SymbolDigraph
 
G() - Method in class SymbolGraph
 
GabowSCC - Class in <Unnamed>
The GabowSCC class represents a data type for determining the strong components in a digraph.
GabowSCC(Digraph) - Constructor for class GabowSCC
Computes the strong components of the digraph G.
GaussianElimination - Class in <Unnamed>
Compilation: javac GaussianElimination.java Execution: java GaussianElimination Gaussian elimination with partial pivoting.
GaussianElimination() - Constructor for class GaussianElimination
 
Genome - Class in <Unnamed>
Compilation: javac Genome.java Execution: java Genome - < input.txt (compress) Execution: java Genome + < input.txt (expand) Dependencies: BinaryIn.java BinaryOut.java Compress or expand a genomic sequence using a 2-bit code.
Genome() - Constructor for class Genome
 
get(Key) - Method in class BinarySearchST
Returns the value associated with the given key, or null if no such key.
get(Key) - Method in class BST
Returns the value associated with the given key.
get(Key) - Method in class BTree
 
get(Key) - Method in class LinearProbingHashST
 
get(Key) - Method in class RedBlackBST
Returns the value associated with the given key.
get(Key) - Method in class SeparateChainingHashST
 
get(Key) - Method in class SequentialSearchST
Returns the value associated with the given key.
get(int) - Method in class SparseVector
 
get(Key) - Method in class ST
Returns the value associated with the given key.
get(String) - Method in class TrieST
Returns the value associated with key in the ST.
get(String) - Method in class TST
 
GrahamScan - Class in <Unnamed>
 
GrahamScan(Point2D[]) - Constructor for class GrahamScan
 
Graph - Class in <Unnamed>
The Graph class represents an undirected graph of vertices named 0 through V - 1.
Graph(int) - Constructor for class Graph
Initializes an empty graph with V vertices and 0 edges.
Graph(In) - Constructor for class Graph
Initializes a graph from an input stream.
Graph(Graph) - Constructor for class Graph
Initializes a new graph that is a deep copy of G.
GraphGenerator - Class in <Unnamed>
The GraphGenerator class provides static methods for creating various graphs, including Erdos-Renyi random graphs, random bipartite graphs, random k-regular graphs, and random rooted trees.
GraphGenerator() - Constructor for class GraphGenerator
 
GREP - Class in <Unnamed>
Compilation: javac GREP.java Execution: java GREP regexp < input.txt Dependencies: NFA.java Data files: http://algs4.cs.princeton.edu/54regexp/tinyL.txt This program takes an RE as a command-line argument and prints the lines from standard input having some substring that is in the language described by the RE.
GREP() - Constructor for class GREP
 

H

hasCycle() - Method in class Cycle
Does the graph have a cycle?
hasCycle() - Method in class DirectedCycle
Does the digraph have a directed cycle?
hasCycle() - Method in class EdgeWeightedDirectedCycle
Does the edge-weighted digraph have a directed cycle?
hashCode() - Method in class Date
Devolve um código hash desta data.
hashCode() - Method in class Point2D
Returns an integer hash code for this point.
hashCode() - Method in class Transaction
Returns a hash code for this transaction.
hasNegativeCycle() - Method in class BellmanFordSP
 
hasNegativeCycle() - Method in class FloydWarshall
 
hasOrder() - Method in class Topological
Does the digraph have a topological order?
hasPath(int, int) - Method in class FloydWarshall
 
hasPathTo(int) - Method in class AcyclicLP
Existe caminho do vértice s ao vértice v?
hasPathTo(int) - Method in class AcyclicSP
Existe caminho do vértice s ao vértice v?
hasPathTo(int) - Method in class BellmanFordSP
 
hasPathTo(int) - Method in class BreadthFirstDirectedPaths
Is there a directed path from the source s (or sources) to vertex v?
hasPathTo(int) - Method in class BreadthFirstPaths
Is there a path between the source s (or sources) and vertex v?
hasPathTo(int) - Method in class DepthFirstDirectedPaths
Is there a directed path from the source vertex s to vertex v?
hasPathTo(int) - Method in class DepthFirstPaths
Is there a path between the source vertex s and vertex v?
hasPathTo(int) - Method in class DijkstraSP
 
Heap - Class in <Unnamed>
The Heap class provides a static methods for heapsorting an array.
height() - Method in class BST
Returns the height of this BST (a one-node tree has height 0).
height() - Method in class BTree
 
height() - Method in class RedBlackBST
Utility functions
HEXADECIMAL - Static variable in class Alphabet
This is the alphabet {0,1,..,9,A,..,F}.
HexDump - Class in <Unnamed>
This program prints a bitstream representing each block of 8 bits in hexadecimal notation.
HexDump() - Constructor for class HexDump
 
Huffman - Class in <Unnamed>
This class of static methods compresses or expands a binary input stream using the Huffman algorithm.
Huffman() - Constructor for class Huffman
 
hull() - Method in class GrahamScan
 

I

id(int) - Method in class CC
Returns the component id of the connected component containing vertex v.
id(int) - Method in class GabowSCC
Returns the component id of the strong component containing vertex v.
id(int) - Method in class KosarajuSharirSCC
Returns the component id of the strong component containing vertex v.
id(int) - Method in class TarjanSCC
Returns the component id of the strong component containing vertex v.
ifft(Complex[]) - Static method in class FFT
 
im() - Method in class Complex
 
increaseKey(int, Key) - Method in class IndexMaxPQ
Increase the key associated with index i to the specified value.
increaseKey(int, Key) - Method in class IndexMinPQ
Increase the key associated with index i to the specified value.
increment() - Method in class Counter
Increments the counter by 1.
inCut(int) - Method in class FordFulkerson
 
index(int) - Method in class SuffixArray
 
index(String) - Method in class SymbolDigraph
 
index(String) - Method in class SymbolGraph
 
IndexMaxPQ<Key extends java.lang.Comparable<Key>> - Class in <Unnamed>
The IndexMaxPQ class represents an indexed priority queue of generic keys.
IndexMaxPQ(int) - Constructor for class IndexMaxPQ
Initializes an empty indexed priority queue with indices between 0 and NMAX-1.
IndexMinPQ<Key extends java.lang.Comparable<Key>> - Class in <Unnamed>
The IndexMinPQ class represents an indexed priority queue of generic keys.
IndexMinPQ(int) - Constructor for class IndexMinPQ
Initializes an empty indexed priority queue with indices between 0 and NMAX-1.
indexSort(Comparable[]) - Static method in class Insertion
Returns a permutation that gives the elements in the array in ascending order.
indexSort(Comparable[]) - Static method in class Merge
Returns a permutation that gives the elements in the array in ascending order.
insert(int, Key) - Method in class IndexMaxPQ
Associate key with index i.
insert(int, Key) - Method in class IndexMinPQ
Associates key with index i.
insert(Key) - Method in class MaxPQ
Adds a new key to the priority queue.
insert(Key) - Method in class MinPQ
Adds a new key to the priority queue.
Insertion - Class in <Unnamed>
The Insertion class provides static methods for sorting an array using insertion sort.
InsertionX - Class in <Unnamed>
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 LinearRegression
Returns the y-intercept α of the best of the best-fit line y = α + β x.
interceptStdErr() - Method in class LinearRegression
Returns the standard error of the estimate for the intercept.
intersects(Interval1D) - Method in class Interval1D
Does this interval intersect that interval?
intersects(Interval2D) - Method in class Interval2D
Does this two-dimensional interval intersect that two-dimensional interval?
intersects(SET<Key>) - Method in class SET
Returns the intersection of this set and that set.
Interval1D - Class in <Unnamed>
The Interval1D class represents a one-dimensional closed interval.
Interval1D(double, double) - Constructor for class Interval1D
Initializes an interval [left, right].
Interval2D - Class in <Unnamed>
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 Interval2D
Initializes a two-dimensional interval.
isAfter(Date) - Method in class Date
Esta data vem depois da data b?
isBefore(Date) - Method in class Date
Esta data vem antes da data b?
isBipartite() - Method in class Bipartite
Is the graph bipartite?
isEmpty() - Method in class Bag
Is this bag empty? Esse saco está vazio?
isEmpty() - Method in class BinarySearchST
Is this symbol table empty?
isEmpty() - Method in class BST
Is this symbol table empty?
isEmpty() - Method in class IndexMaxPQ
Is the priority queue empty?
isEmpty() - Method in class IndexMinPQ
Is the priority queue empty?
isEmpty() - Method in class LinearProbingHashST
 
isEmpty() - Method in class LinkedBag
Is this bag empty?
isEmpty() - Method in class LinkedQueue
Is this queue empty?
isEmpty() - Method in class LinkedStack
Is this stack empty? Returns true if this stack is empty; false otherwise.
isEmpty() - Method in class MaxPQ
Is the priority queue empty?
isEmpty() - Method in class MinPQ
Is the priority queue empty?
isEmpty() - Method in class Queue
Is this queue empty?
isEmpty() - Method in class RedBlackBST
Is this symbol table empty?
isEmpty() - Method in class ResizingArrayBag
Is this bag empty?
isEmpty() - Method in class ResizingArrayQueue
Is this queue empty?
isEmpty() - Method in class ResizingArrayStack
Is this stack empty? Returns true if this stack is empty; false otherwise.
isEmpty() - Method in class SeparateChainingHashST
 
isEmpty() - Method in class SequentialSearchST
Is this symbol table empty?
isEmpty() - Method in class SET
Is this symbol table empty?
isEmpty() - Method in class ST
Is this symbol table empty?
isEmpty() - Method in class Stack
Is this stack empty? Returns true if this stack is empty; false otherwise.
iterator() - Method in class Bag
Returns an iterator that iterates over the items in the bag in arbitrary order.
iterator() - Method in class IndexMaxPQ
Returns an iterator that iterates over the keys on the priority queue in descending order.
iterator() - Method in class IndexMinPQ
Returns an iterator that iterates over the keys on the priority queue in ascending order.
iterator() - Method in class LinkedBag
Returns an iterator that iterates over the items in the bag.
iterator() - Method in class LinkedQueue
Returns an iterator that iterates over the items in this queue in FIFO order.
iterator() - Method in class LinkedStack
Returns an iterator that iterates through the items of this stack in LIFO order.
iterator() - Method in class MaxPQ
Returns an iterator that iterates over the keys on the priority queue in descending order.
iterator() - Method in class MinPQ
Returns an iterator that iterates over the keys on the priority queue in ascending order.
iterator() - Method in class Queue
Returns an iterator that iterates over the items in this queue in FIFO order.
iterator() - Method in class ResizingArrayBag
Returns an iterator that iterates over the items in the bag in arbitrary order.
iterator() - Method in class ResizingArrayQueue
Returns an iterator that iterates over the items in this queue in FIFO order.
iterator() - Method in class ResizingArrayStack
Returns an iterator that iterates through the items of the stack in LIFO order.
iterator() - Method in class SET
Returns all of the keys in the symbol table as an iterator.
iterator() - Method in class 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 Stack
Returns an iterator to this stack that iterates through the items in LIFO order.

K

keyOf(int) - Method in class IndexMaxPQ
Returns the key associated with index i.
keyOf(int) - Method in class IndexMinPQ
Returns the key associated with index i.
keys() - Method in class BinarySearchST
Returns an iterable queue containing all keys in this symbol table.
keys(Key, Key) - Method in class BinarySearchST
Returns an iterable queue containing all keys of this symbol table that belong to the closed interval [lo, hi].
keys() - Method in class BST
Range count and range search.
keys(Key, Key) - Method in class BST
 
keys() - Method in class LinearProbingHashST
 
keys() - Method in class RedBlackBST
Range count and range search.
keys(Key, Key) - Method in class RedBlackBST
 
keys() - Method in class SeparateChainingHashST
 
keys() - Method in class SequentialSearchST
Returns all keys in the symbol table as an Iterable.
keys() - Method in class ST
Returns all keys in the symbol table as an Iterable.
keys() - Method in class TrieST
Returns all the keys in the ST.
keys() - Method in class TST
 
keysThatMatch(String) - Method in class TrieST
Returns all the keys that match the pattern pat (in particular, all characters .
keysWithPrefix(String) - Method in class TrieST
Takes a string as argument and returns all the keys in the ST having that string as prefix.
kineticEnergy() - Method in class Particle
 
KMP - Class in <Unnamed>
This class implements the Knuth-Morris-Pratt algorithm to search for an occurrence of a given string pat in a given string txt.
KMP(String) - Constructor for class KMP
Creates the DFA for a pattern over the extended ASCII alphabet.
KMP(char[], int) - Constructor for class KMP
Creates the DFA from a pattern over an R-character alphabet.
Knuth - Class in <Unnamed>
The Knuth class provides a client for reading in a sequence of strings and shuffling them using the Knuth (or Fisher-Yates) shuffling algorithm.
KosarajuSharirSCC - Class in <Unnamed>
The KosarajuSharirSCC class represents a data type for determining the strong components in a digraph.
KosarajuSharirSCC(Digraph) - Constructor for class KosarajuSharirSCC
Computes the strong components of the digraph G.
KruskalMST - Class in <Unnamed>
Compilation: javac KruskalMST.java Execution: java KruskalMST filename.txt Dependencies: EdgeWeightedGraph.java Edge.java Queue.java UF.java In.java StdOut.java Data files: http://algs4.cs.princeton.edu/43mst/tinyEWG.txt http://algs4.cs.princeton.edu/43mst/mediumEWG.txt http://algs4.cs.princeton.edu/43mst/largeEWG.txt Compute a minimum spanning forest using Kruskal's algorithm.
KruskalMST(EdgeWeightedGraph) - Constructor for class KruskalMST
 
KWIK - Class in <Unnamed>
Compilation: javac KWIK.java Execution: java KWIK file.txt Dependencies: StdIn.java In.java Data files: http://algs4.cs.princeton.edu/63suffix/tale.txt % java KWIK tale.txt 15 majesty most gracious majesty king george th rnkeys and the majesty of the law fir on against the majesty of the people se them to his majestys chief secreta h lists of his majestys forces and of the worst w the best and the worst are known to y f them give me the worst first there th for in case of the worst is a friend in e roomdoor and the worst is over then a pect mr darnay the worst its the wisest is his brother the worst of a bad race ss in them for the worst of health for you have seen the worst of her agitati cumwented into the worst of luck buuust n your brother the worst of the bad rac full share in the worst of the day pla mes to himself the worst of the strife f times it was the worst of times it wa ould hope that the worst was over well urage business the worst will be over i clesiastics of the worst world worldly
KWIK() - Constructor for class KWIK
 

L

LazyPrimMST - Class in <Unnamed>
Compilation: javac LazyPrimMST.java Execution: java LazyPrimMST filename.txt Dependencies: EdgeWeightedGraph.java Edge.java Queue.java MinPQ.java UF.java In.java StdOut.java Data files: http://algs4.cs.princeton.edu/43mst/tinyEWG.txt http://algs4.cs.princeton.edu/43mst/mediumEWG.txt http://algs4.cs.princeton.edu/43mst/largeEWG.txt Compute a minimum spanning forest using a lazy version of Prim's algorithm.
LazyPrimMST(EdgeWeightedGraph) - Constructor for class LazyPrimMST
 
lcp(int) - Method in class SuffixArray
 
left() - Method in class Interval1D
Returns the left endpoint.
LEFT_ENDPOINT_ORDER - Static variable in class Interval1D
Compares two intervals by left endpoint.
length() - Method in class Interval1D
Returns the length of this interval.
length() - Method in class SuffixArray
 
length() - Method in class Vector
Returns the length of this vector.
LENGTH_ORDER - Static variable in class Interval1D
Compares two intervals by length.
levelOrder() - Method in class BST
 
lgR() - Method in class Alphabet
Returns number of bits necessary to represent the index of a character.
LinearProbingHashST<Key,Value> - Class in <Unnamed>
Compilation: javac LinearProbingHashST.java Execution: java LinearProbingHashST Symbol table implementation with linear probing hash table.
LinearProbingHashST() - Constructor for class LinearProbingHashST
 
LinearProbingHashST(int) - Constructor for class LinearProbingHashST
 
LinearRegression - Class in <Unnamed>
The LinearRegression class performs a simple linear regression on an set of N data points (yi, xi).
LinearRegression(double[], double[]) - Constructor for class LinearRegression
Performs a linear regression on the data points (y[i], x[i]).
LinkedBag<Item> - Class in <Unnamed>
The LinkedBag class represents a bag (or multiset) of generic items.
LinkedBag() - Constructor for class LinkedBag
Initializes an empty bag.
LinkedQueue<Item> - Class in <Unnamed>
The LinkedQueue class represents a first-in-first-out (FIFO) queue of generic items.
LinkedQueue() - Constructor for class LinkedQueue
Creates an empty queue.
LinkedStack<Item> - Class in <Unnamed>
The LinkedStack class represents a last-in-first-out (LIFO) stack of generic items.
LinkedStack() - Constructor for class LinkedStack
Initializes an empty stack.
LongestCommonSubstring - Class in <Unnamed>
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 LongestCommonSubstring
 
longestPrefixOf(String) - Method in class TrieST
Find the longest prefix of query that is a key in the ST represented by this trie.
longestPrefixOf(String) - Method in class TST
Find and return longest prefix of s in TST
LookupCSV - Class in <Unnamed>
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 LookupCSV
 
LookupIndex - Class in <Unnamed>
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 LookupIndex
 
LOWERCASE - Static variable in class Alphabet
This is the 26-letter alphabet {a,b,..,x,y,z}.
LRS - Class in <Unnamed>
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 LRS
 
LSD - Class in <Unnamed>
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 LSD
 
lsolve(double[][], double[]) - Static method in class GaussianElimination
 
LZW - Class in <Unnamed>
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 LZW
 

M

magnitude() - Method in class Vector
Returns the Euclidean norm of this vector.
main(String[]) - Static method in class AcyclicLP
Teste de unidade.
main(String[]) - Static method in class AcyclicSP
Teste de unidade.
main(String[]) - Static method in class AdjMatrixEdgeWeightedDigraph
 
main(String[]) - Static method in class Alphabet
Test client (ignores command-line arguments).
main(String[]) - Static method in class Arbitrage
Reads from standard input a table of exchange rates of a set of currencies.
main(String[]) - Static method in class AssignmentProblem
 
main(String[]) - Static method in class Average
Prints average of given numbers.
main(String[]) - Static method in class Bag
Unit test of this Bag data type.
main(String[]) - Static method in class BellmanFordSP
 
main(String[]) - Static method in class BinaryDump
Reads a binary file and writes out the bits, N per line (N is a command-line argument).
main(String[]) - Static method in class BinarySearch
Whitelist filter.
main(String[]) - Static method in class BinarySearchST
Test client.
main(String[]) - Static method in class Bipartite
Unit tests the Bipartite data type.
main(String[]) - Static method in class BipartiteMatching
 
main(String[]) - Static method in class BlackFilter
Sample run:
main(String[]) - Static method in class BoruvkaMST
 
main(String[]) - Static method in class BoyerMoore
 
main(String[]) - Static method in class BreadthFirstDirectedPaths
Unit tests the BreadthFirstDirectedPaths data type.
main(String[]) - Static method in class BreadthFirstPaths
Unit tests the BreadthFirstPaths data type.
main(String[]) - Static method in class BST
Teste client.
main(String[]) - Static method in class BTree
test client
main(String[]) - Static method in class 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 CC
Unit tests the CC data type.
main(String[]) - Static method in class ClosestPair
Unit test client.
main(String[]) - Static method in class CollisionSystem
Sample client
main(String[]) - Static method in class Complex
 
main(String[]) - Static method in class Count
Sample run:
main(String[]) - Static method in class 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 CPM
 
main(String[]) - Static method in class Cycle
Unit tests the Cycle data type.
main(String[]) - Static method in class Date
Teste de unidade desta classe.
main(String[]) - Static method in class DeDup
 
main(String[]) - Static method in class DegreesOfSeparation
 
main(String[]) - Static method in class DepthFirstDirectedPaths
Unit tests the DepthFirstDirectedPaths data type.
main(String[]) - Static method in class DepthFirstOrder
Receives, on the command-line, the name of a file containing the description of a digraph or an edge-weighted digraph (but ignores the weights of the edges).
main(String[]) - Static method in class DepthFirstPaths
Unit tests the DepthFirstPaths data type.
main(String[]) - Static method in class DepthFirstSearch
Unit tests the DepthFirstSearch data type.
main(String[]) - Static method in class Digraph
Test client.
main(String[]) - Static method in class DigraphGenerator
 
main(String[]) - Static method in class DijkstraSP
 
main(String[]) - Static method in class DirectedCycle
Unit tests the DirectedCycle data type.
main(String[]) - Static method in class DirectedDFS
Unit tests the DirectedDFS data type.
main(String[]) - Static method in class DirectedEdge
Test client.
main(String[]) - Static method in class 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 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 Edge
Test client.
main(String[]) - Static method in class EdgeWeightedDigraph
Test client.
main(String[]) - Static method in class EdgeWeightedDirectedCycle
Unit tests the EdgeWeightedDirectedCycle data type.
main(String[]) - Static method in class EdgeWeightedGraph
Test client.
main(String[]) - Static method in class FarthestPair
 
main(String[]) - Static method in class 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 FileIndex
 
main(String[]) - Static method in class FlowEdge
Test client.
main(String[]) - Static method in class FlowNetwork
 
main(String[]) - Static method in class FloydWarshall
 
main(String[]) - Static method in class FordFulkerson
 
main(String[]) - Static method in class FrequencyCounter
Reads in a command-line integer representing a threshold and sequence of words from standard input.
main(String[]) - Static method in class GabowSCC
Unit tests the GabowSCC data type.
main(String[]) - Static method in class GaussianElimination
 
main(String[]) - Static method in class Genome
 
main(String[]) - Static method in class GrahamScan
 
main(String[]) - Static method in class Graph
Unit tests the Graph data type.
main(String[]) - Static method in class GraphGenerator
Unit tests the GraphGenerator library.
main(String[]) - Static method in class GREP
 
main(String[]) - Static method in class 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 HexDump
Reads a binary file and writes out the bits, N per line (N is a command-line argument), representing each block of 8 bits in hexadecimal notation..
main(String[]) - Static method in class Huffman
Test client.
main(String[]) - Static method in class IndexMaxPQ
Unit tests the IndexMaxPQ data type.
main(String[]) - Static method in class IndexMinPQ
Unit tests the IndexMinPQ data type.
main(String[]) - Static method in class 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 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 Interval1D
Unit tests the Interval1D data type.
main(String[]) - Static method in class Interval2D
Unit tests the Interval2D data type.
main(String[]) - Static method in class KMP
Test client.
main(String[]) - Static method in class Knuth
Reads in a sequence of strings from standard input, shuffles them, and prints out the results.
main(String[]) - Static method in class KosarajuSharirSCC
Unit tests the KosarajuSharirSCC data type.
main(String[]) - Static method in class KruskalMST
 
main(String[]) - Static method in class KWIK
 
main(String[]) - Static method in class LazyPrimMST
 
main(String[]) - Static method in class LinearProbingHashST
Unit test client.
main(String[]) - Static method in class LinkedBag
Unit tests the LinkedBag data type.
main(String[]) - Static method in class LinkedQueue
Unit test facility.
main(String[]) - Static method in class LinkedStack
Unit test of this LinkedStack data type.
main(String[]) - Static method in class LongestCommonSubstring
 
main(String[]) - Static method in class LookupCSV
 
main(String[]) - Static method in class LookupIndex
 
main(String[]) - Static method in class LRS
 
main(String[]) - Static method in class LSD
 
main(String[]) - Static method in class LZW
 
main(String[]) - Static method in class MaxPQ
Unit tests the MaxPQ data type.
main(String[]) - Static method in class 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 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 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 MinPQ
Unit tests the MinPQ data type.
main(String[]) - Static method in class MSD
 
main(String[]) - Static method in class 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 NFA
 
main(String[]) - Static method in class PictureDump
Reads a binary file and writes out the bits as a w-by-h picture.
main(String[]) - Static method in class Point2D
Unit tests the point data type.
main(String[]) - Static method in class PolynomialRegression
 
main(String[]) - Static method in class PrimMST
 
main(String[]) - Static method in class Queue
Unit tests the Queue data type.
main(String[]) - Static method in class Quick
Teste de unidade da classe.
main(String[]) - Static method in class Quick3string
 
main(String[]) - Static method in class 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 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 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 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 RabinKarp
Test client.
main(String[]) - Static method in class 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 RedBlackBST
Test client
main(String[]) - Static method in class ResizingArrayBag
Unit tests the ResizingArrayBag data type.
main(String[]) - Static method in class ResizingArrayQueue
Unit tests the ResizingArrayQueue data type.
main(String[]) - Static method in class ResizingArrayStack
Unit test of this ResizingArrayStack class.
main(String[]) - Static method in class RunLength
 
main(String[]) - Static method in class 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 SeparateChainingHashST
Unit test client.
main(String[]) - Static method in class SequentialSearchST
Unit tests the SequentialSearchST data type.
main(String[]) - Static method in class SET
Unit tests the SET data type.
main(String[]) - Static method in class 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 Simplex
 
main(String[]) - Static method in class SparseVector
 
main(String[]) - Static method in class ST
Unit tests the ST data type.
main(String[]) - Static method in class Stack
Unit test of this Stack class.
main(String[]) - Static method in class SuffixArray
 
main(String[]) - Static method in class SymbolDigraph
 
main(String[]) - Static method in class SymbolGraph
 
main(String[]) - Static method in class TarjanSCC
Unit tests the TarjanSCC data type.
main(String[]) - Static method in class 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 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 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 Topological
Unit tests the Topological data type.
main(String[]) - Static method in class Transaction
Unit tests the transaction data type.
main(String[]) - Static method in class TransitiveClosure
 
main(String[]) - Static method in class TrieST
Test client.
main(String[]) - Static method in class TST
 
main(String[]) - Static method in class 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 Vector
Unit tests the data type methods.
main(String[]) - Static method in class 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 WhiteFilter
 
main(String[]) - Static method in class Whitelist
Reads in a sequence of integers from the whitelist file, specified as a command-line argument.
marked(int) - Method in class DepthFirstSearch
Is there a path between the source vertex s and vertex v?
marked(int) - Method in class DirectedDFS
Is there a directed path from the source vertex (or any of the source vertices) and vertex v?
max() - Method in class BinarySearchST
Returns the greatest key in this table.
max() - Method in class BST
Returns the largest key in the symbol table (or null if the table is empty).
max() - Method in class MaxPQ
Returns a largest key on the priority queue.
max() - Method in class RedBlackBST
 
max() - Method in class SET
Returns the largest key in the set.
max() - Method in class ST
Returns the largest key in the symbol table.
maxIndex() - Method in class IndexMaxPQ
Returns an index associated with a maximum key.
maxKey() - Method in class IndexMaxPQ
Return a maximum key.
MaxPQ<Key> - Class in <Unnamed>
The MaxPQ class represents a priority queue of generic keys.
MaxPQ(int) - Constructor for class MaxPQ
Initializes an empty priority queue with the given initial capacity.
MaxPQ() - Constructor for class MaxPQ
Initializes an empty priority queue.
MaxPQ(int, Comparator<Key>) - Constructor for class MaxPQ
Initializes an empty priority queue with the given initial capacity, using the given comparator.
MaxPQ(Comparator<Key>) - Constructor for class MaxPQ
Initializes an empty priority queue using the given comparator.
MaxPQ(Key[]) - Constructor for class MaxPQ
Initializes a priority queue from the array of keys.
Merge - Class in <Unnamed>
The Merge class provides static methods for sorting an array using mergesort.
MergeBU - Class in <Unnamed>
The MergeBU class provides static methods for sorting an array using bottom-up mergesort.
MergeX - Class in <Unnamed>
The MergeX class provides static methods for sorting an array using an optimized version of mergesort.
min() - Method in class BinarySearchST
Returns the smallest key in this table.
min() - Method in class BST
Returns the smallest key in the symbol table (or null if the table is empty).
min() - Method in class MinPQ
Returns a smallest key on the priority queue.
min() - Method in class RedBlackBST
Ordered symbol table methods.
min() - Method in class SET
Returns the smallest key in the set.
min() - Method in class ST
Returns the smallest key in the symbol table.
minIndex() - Method in class IndexMinPQ
Returns an index associated with a minimum key.
minKey() - Method in class IndexMinPQ
Returns a minimum key.
MinPQ<Key> - Class in <Unnamed>
The MinPQ class represents a priority queue of generic keys.
MinPQ(int) - Constructor for class MinPQ
Initializes an empty priority queue with the given initial capacity.
MinPQ() - Constructor for class MinPQ
Initializes an empty priority queue.
MinPQ(int, Comparator<Key>) - Constructor for class MinPQ
Initializes an empty priority queue with the given initial capacity, using the given comparator.
MinPQ(Comparator<Key>) - Constructor for class MinPQ
Initializes an empty priority queue using the given comparator.
MinPQ(Key[]) - Constructor for class MinPQ
Initializes a priority queue from the array of keys.
minus(Complex) - Method in class Complex
 
minus(Vector) - Method in class Vector
Returns the difference between this vector and that vector: this - that.
month() - Method in class Date
Devolve o mês (um inteiro em 1..12) desta data.
move(double) - Method in class Particle
 
MSD - Class in <Unnamed>
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 MSD
 
Multiway - Class in <Unnamed>
The Multiway class provides a client for reading in several sorted text files and merging them together into a single sorted text stream.

N

name(int) - Method in class SymbolDigraph
 
name(int) - Method in class SymbolGraph
 
negativeCycle() - Method in class BellmanFordSP
 
negativeCycle() - Method in class FloydWarshall
 
next() - Method in class Date
Devolve a data seguinte do calendário.
NFA - Class in <Unnamed>
Compilation: javac NFA.java Execution: java NFA regexp text Dependencies: Stack.java Bag.java Digraph.java DirectedDFS.java % java NFA "(A*B|AC)D" AAAABD true % java NFA "(A*B|AC)D" AAAAC false % java NFA "(a|(bc)*d)*" abcbcd true % java NFA "(a|(bc)*d)*" abcbcbcdaaaabcbcdaaaddd true Remarks ----------- - This version does not currently suport multiway or, wildcard, or the + operator.
NFA(String) - Constructor for class NFA
 
nnz() - Method in class SparseVector
 
norm() - Method in class SparseVector
 

O

OCTAL - Static variable in class Alphabet
This is the alphabet {0,1,..,7}.
oddCycle() - Method in class Bipartite
Returns an odd-length cycle if the graph is not bipartite, and null otherwise.
order() - Method in class Topological
Returns a topological order if the digraph has a topologial order, and null otherwise.
other() - Method in class ClosestPair
 
other(int) - Method in class Edge
Return the endpoint of this edge that is different from the given vertex (unless a self-loop).
other() - Method in class FarthestPair
 
other(int) - Method in class FlowEdge
 
outdegree(int) - Method in class EdgeWeightedDigraph
Return number of edges incident from v.

P

Particle - Class in <Unnamed>
 
Particle(double, double, double, double, double, double, Color) - Constructor for class Particle
 
Particle() - Constructor for class Particle
 
path(int) - Static method in class DigraphGenerator
 
path(int, int) - Method in class DijkstraAllPairsSP
 
path(int, int) - Method in class FloydWarshall
 
path(int) - Static method in class GraphGenerator
Returns a path graph on V vertices.
pathTo(int) - Method in class AcyclicLP
Devolve a sequência de vértices de um caminho de peso máximo do vértice s ao vértice v.
pathTo(int) - Method in class AcyclicSP
Devolve a sequência de vértices de um caminho de peso mínimo do vértice s ao vértice v.
pathTo(int) - Method in class BellmanFordSP
 
pathTo(int) - Method in class BreadthFirstDirectedPaths
Returns a shortest path from s (or sources) to v, or null if no such path.
pathTo(int) - Method in class BreadthFirstPaths
Returns a shortest path between s (or sources) and v, or null if no such path.
pathTo(int) - Method in class DepthFirstDirectedPaths
Returns a directed path from the source vertex s to vertex v, or null if no such path.
pathTo(int) - Method in class DepthFirstPaths
Returns a path between the source vertex s and vertex v, or null if no such path.
pathTo(int) - Method in class DijkstraSP
 
peek() - Method in class LinkedQueue
Returns the item least recently added to this queue but does not remove the item.
peek() - Method in class LinkedStack
Returns (but does not remove) the item most recently added to this stack.
peek() - Method in class Queue
Returns the item least recently added to this queue.
peek() - Method in class ResizingArrayQueue
Returns the item least recently added to this queue, but does not remove the item from the queue.
peek() - Method in class ResizingArrayStack
Returns (but does not remove) the item most recently added to this stack.
peek() - Method in class Stack
Returns (but does not remove) the item most recently added to this stack.
phase() - Method in class Complex
 
PictureDump - Class in <Unnamed>
This program prints a bitstream.
PictureDump() - Constructor for class PictureDump
 
plus(Complex) - Method in class Complex
 
plus(Complex, Complex) - Static method in class Complex
 
plus(SparseVector) - Method in class SparseVector
 
plus(Vector) - Method in class Vector
Returns the sum of this vector and that vector: this + that.
Point2D - Class in <Unnamed>
The Point class is an immutable data type to encapsulate a two-dimensional point with real-value coordinates.
Point2D(double, double) - Constructor for class Point2D
Initializes a new point (x, y).
POLAR_ORDER - Variable in class Point2D
Compares two points by polar angle (between 0 and 2pi) with respect to this point.
PolynomialRegression - Class in <Unnamed>
The PolynomialRegression class performs a polynomial regression on an set of N data points (yi, xi).
PolynomialRegression(double[], double[], int) - Constructor for class PolynomialRegression
Performs a polynomial reggression on the data points (y[i], x[i]).
pop() - Method in class LinkedStack
Removes and returns the item most recently added to this stack.
pop() - Method in class ResizingArrayStack
Removes and returns the item most recently added to this stack.
pop() - Method in class Stack
Removes and returns the item most recently added to this stack.
post(int) - Method in class DepthFirstOrder
Returns the postorder number of vertex v.
post() - Method in class DepthFirstOrder
Returns vertices in postorder as an Iterable.
pre(int) - Method in class DepthFirstOrder
Returns the preorder number of vertex v.
pre() - Method in class DepthFirstOrder
Returns vertices in preorder as an Iterable.
predict(double) - Method in class LinearRegression
Returns the expected response y given the value of the predictor variable x.
predict(double) - Method in class PolynomialRegression
Returns the expected response y given the value of the predictor variable x.
prefixMatch(String) - Method in class TST
 
primal() - Method in class Simplex
 
PrimMST - Class in <Unnamed>
Compilation: javac PrimMST.java Execution: java PrimMST filename.txt Dependencies: EdgeWeightedGraph.java Edge.java Queue.java IndexMinPQ.java UF.java In.java StdOut.java Data files: http://algs4.cs.princeton.edu/43mst/tinyEWG.txt http://algs4.cs.princeton.edu/43mst/mediumEWG.txt http://algs4.cs.princeton.edu/43mst/largeEWG.txt Compute a minimum spanning forest using Prim's algorithm.
PrimMST(EdgeWeightedGraph) - Constructor for class PrimMST
 
printAll(int[]) - Static method in class 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 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 Alphabet
This is the 20-letter alphabet {A,C,D,E,F,G,H,I,K,L,M,N,P,Q,R,S,T,V,W,Y}.
push(Item) - Method in class LinkedStack
Adds item to this stack.
push(Item) - Method in class ResizingArrayStack
Adds item to this stack.
push(Item) - Method in class Stack
Adds item to this stack.
put(Key, Value) - Method in class BinarySearchST
Search for key in this symbol table.
put(Key, Value) - Method in class BST
Inserts (key,value) pair into the BST representing this symbol table.
put(Key, Value) - Method in class BTree
 
put(Key, Value) - Method in class LinearProbingHashST
 
put(Key, Value) - Method in class RedBlackBST
Red-black insertion
put(Key, Value) - Method in class SeparateChainingHashST
 
put(Key, Value) - Method in class SequentialSearchST
Inserts the (key, val) pair into the symbol table, overwriting the old value with val if the key is already in the symbol table.
put(int, double) - Method in class SparseVector
 
put(Key, Value) - Method in class 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 TrieST
Insert (key,value) pair into the ST.
put(String, Value) - Method in class TST
Insert string s into the symbol table.

Q

Queue<Item> - Class in <Unnamed>
The Queue class represents a first-in-first-out (FIFO) queue of generic items.
Queue() - Constructor for class Queue
Constructor: initializes an empty queue.
Quick - Class in <Unnamed>
Esta é uma biblioteca de métodos estáticos para ordenar um vetor e para selecionar o k-ésimo menor element do vetor.
Quick3string - Class in <Unnamed>
Compilation: javac Quick3string.java Execution: java Quick3string < input.txt Reads string from standard input and 3-way string quicksort them.
Quick3string() - Constructor for class Quick3string
 
Quick3way - Class in <Unnamed>
The Quick3way class provides static methods for sorting an array using quicksort with 3-way partitioning.
QuickFindUF - Class in <Unnamed>
The QuickFindUF class represents a union-find data structure.
QuickFindUF(int) - Constructor for class QuickFindUF
Initializes an empty union-find data structure with N isolated components 0 through N-1.
QuickUnionUF - Class in <Unnamed>
The QuickUnionUF class represents a union-find data structure.
QuickUnionUF(int) - Constructor for class QuickUnionUF
Initializes an empty union-find data structure with N isolated components 0 through N-1.
QuickX - Class in <Unnamed>
The QuickX class provides static methods for sorting an array using an optimized version of quicksort (using Bentley-McIlroy 3-way partitioning, Tukey's ninther, and cutoff to insertion sort).

R

R() - Method in class Alphabet
Returns radix R.
r() - Method in class Point2D
Returns the polar radius of this point.
R2() - Method in class LinearRegression
Returns the coefficient of determination R2.
R2() - Method in class PolynomialRegression
Returns the coefficient of determination R2.
R_ORDER - Static variable in class Point2D
Compares two points by polar radius.
RabinKarp - Class in <Unnamed>
This class implements the Rabin-Karp algorithm to search for an occurrence of a given string pat in a given string txt.
RabinKarp(int, char[]) - Constructor for class RabinKarp
Not supported yet.
RabinKarp(String) - Constructor for class RabinKarp
Constructs a RabinKarp object for the extended ASCII alphabet and a pattern pat given by a string.
RandomSeq - Class in <Unnamed>
The RandomSeq class is a client that prints out a pseudorandom sequence of real numbers in a given range.
rank(int, int[]) - Static method in class BinarySearch
Searches for the integer key in the sorted array a[].
rank(Key) - Method in class BinarySearchST
Returns the number of keys in the table that are strictly smaller than the given key.
rank(Key) - Method in class BST
Returns the rank of the given key.
rank(Key) - Method in class RedBlackBST
 
rank(int) - Method in class StaticSETofInts
Returns either the index of the search key in the sorted array (if the key is in the set) or -1 (if the key is not in the set).
rank(String) - Method in class SuffixArray
 
re() - Method in class Complex
 
reachable(int, int) - Method in class TransitiveClosure
 
reciprocal() - Method in class Complex
 
recognizes(String) - Method in class NFA
 
RedBlackBST<Key extends java.lang.Comparable<Key>,Value> - Class in <Unnamed>
This is an implementation of a symbol table whose keys are comparable.
RedBlackBST() - Constructor for class RedBlackBST
 
regular(int, int) - Static method in class GraphGenerator
Returns a uniformly random k-regular graph on V vertices (not necessarily simple).
residualCapacityTo(int) - Method in class FlowEdge
 
ResizingArrayBag<Item> - Class in <Unnamed>
The ResizingArrayBag class represents a bag (or multiset) of generic items.
ResizingArrayBag() - Constructor for class ResizingArrayBag
Initializes an empty bag.
ResizingArrayQueue<Item> - Class in <Unnamed>
The ResizingArrayQueue class represents a first-in-first-out (FIFO) queue of generic items.
ResizingArrayQueue() - Constructor for class ResizingArrayQueue
Initializes an empty queue.
ResizingArrayStack<Item> - Class in <Unnamed>
The ResizingArrayStack class represents a last-in-first-out (LIFO) stack of generic items.
ResizingArrayStack() - Constructor for class ResizingArrayStack
Initializes an empty stack.
reverse() - Method in class Digraph
Return the reverse of the digraph.
reversePost() - Method in class DepthFirstOrder
 
right() - Method in class Interval1D
Returns the right endpoint.
RIGHT_ENDPOINT_ORDER - Static variable in class Interval1D
Compares two intervals by right endpoint.
rootedInDAG(int, int) - Static method in class DigraphGenerator
 
rootedInTree(int) - Static method in class DigraphGenerator
 
rootedOutDAG(int, int) - Static method in class DigraphGenerator
 
rootedOutTree(int) - Static method in class DigraphGenerator
 
RunLength - Class in <Unnamed>
Compilation: javac RunLength.java Execution: java RunLength - < input.txt (compress) Execution: java RunLength + < input.txt (expand) Dependencies: BinaryIn.java BinaryOut.java Compress or expand binary input from standard input using run-length encoding.
RunLength() - Constructor for class RunLength
 

S

scale(double) - Method in class SparseVector
 
search(String) - Method in class BoyerMoore
 
search(char[]) - Method in class BoyerMoore
 
search(String) - Method in class KMP
Returns offset of first match of pattern in text; returns N if no match.
search(char[]) - Method in class KMP
Returns offset of first match of pattern in text; returns N if no match The text is a character array.
search(String) - Method in class RabinKarp
Returns the starting index of the first (exact) occurrence of the pattern in txt.
select(int) - Method in class BinarySearchST
Returns a key that is strictly greater than (exactly) k other keys in the table.
select(int) - Method in class BST
Returns the key whose rank is k.
select(Comparable[], int) - Static method in class Quick
Rearranja o vetor a[] de modo que a[k] seja o k-ésimo menor elemento.
select(int) - Method in class RedBlackBST
 
select(int) - Method in class SuffixArray
 
Selection - Class in <Unnamed>
The Selection class provides static methods for sorting an array using selection sort.
SeparateChainingHashST<Key,Value> - Class in <Unnamed>
This is an implementation of a symbol table using a hash table.
SeparateChainingHashST() - Constructor for class SeparateChainingHashST
Constructor.
SeparateChainingHashST(int) - Constructor for class SeparateChainingHashST
Constructor.
SequentialSearchST<Key,Value> - Class in <Unnamed>
The SequentialSearchST class represents an (unordered) symbol table of generic (key,value) pairs.
SequentialSearchST() - Constructor for class SequentialSearchST
Initializes an empty symbol table.
SET<Key extends java.lang.Comparable<Key>> - Class in <Unnamed>
The SET class represents an ordered set of comparable keys.
SET() - Constructor for class SET
Initializes an empty set.
Shell - Class in <Unnamed>
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 FFT
 
show() - Method in class Simplex
 
shuffle(Object[]) - Static method in class 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 DigraphGenerator
 
simple(int, int) - Static method in class GraphGenerator
Returns a random simple graph containing V vertices and E edges.
simple(int, double) - Static method in class GraphGenerator
Returns a random simple graph on V vertices, with an edge between any two vertices with probability p.
Simplex - Class in <Unnamed>
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 Simplex
 
simulate(double) - Method in class CollisionSystem
Event based simulation for limit seconds
sin() - Method in class Complex
 
size() - Method in class Bag
Returns the number of items in this bag (each repeated item counts).
size() - Method in class BinarySearchST
Returns the number of (key,value) pairs in this symbol table.
size(Key, Key) - Method in class BinarySearchST
Number of keys in the closed interval [lo, hi].
size() - Method in class BST
Returns the number of (key,value) pairs in this symbol table (i.e., the number of node os the tree).
size(Key, Key) - Method in class BST
 
size() - Method in class BTree
 
size(int) - Method in class CC
Returns the number of vertices in the connected component containing vertex v.
size() - Method in class IndexMaxPQ
Returns the number of keys on the priority queue.
size() - Method in class IndexMinPQ
Returns the number of keys on the priority queue.
size() - Method in class LinearProbingHashST
 
size() - Method in class LinkedBag
Returns the number of items in this bag.
size() - Method in class LinkedQueue
Returns the number of items in this queue.
size() - Method in class LinkedStack
Returns the number of items in this stack.
size() - Method in class MaxPQ
Returns the number of keys on the priority queue.
size() - Method in class MinPQ
Returns the number of keys on the priority queue.
size() - Method in class Queue
Returns the number of items in this queue.
size() - Method in class RedBlackBST
Returns the number of (key,value) pairs in this symbol table.
size(Key, Key) - Method in class RedBlackBST
 
size() - Method in class ResizingArrayBag
Returns the number of items in this bag.
size() - Method in class ResizingArrayQueue
Returns the number of items in this queue.
size() - Method in class ResizingArrayStack
Returns the number of items in the stack.
size() - Method in class SeparateChainingHashST
 
size() - Method in class SequentialSearchST
Returns the number of (key, value) pairs in this symbol table.
size() - Method in class SET
Returns the number of key-value pairs in this symbol table.
size() - Method in class SparseVector
 
size() - Method in class ST
Returns the number of key-value pairs in this symbol table.
size() - Method in class Stack
Returns the number of items in the stack.
size() - Method in class TST
 
slope() - Method in class LinearRegression
Returns the slope β of the best of the best-fit line y = α + β x.
slopeStdErr() - Method in class LinearRegression
Returns the standard error of the estimate for the slope.
sol(int) - Method in class AssignmentProblem
 
sort(Comparable[]) - Static method in class Heap
Rearranges the array in ascending order, using the natural order.
sort(Comparable[]) - Static method in class Insertion
Rearranges the array in ascending order, using the natural order.
sort(Object[], Comparator) - Static method in class Insertion
Rearranges the array in ascending order, using a comparator.
sort(Comparable[]) - Static method in class InsertionX
Rearranges the array in ascending order, using the natural order.
sort(String[], int) - Static method in class LSD
 
sort(Comparable[]) - Static method in class Merge
Rearranges the array in ascending order, using the natural order.
sort(Comparable[]) - Static method in class MergeBU
Rearranges the array in ascending order, using the natural order.
sort(Comparable[]) - Static method in class MergeX
Rearranges the array in ascending order, using the natural order.
sort(String[]) - Static method in class MSD
 
sort(Comparable[]) - Static method in class Quick
Rearanja o vetor a[] em ordem crescente.
sort(String[]) - Static method in class Quick3string
 
sort(Comparable[]) - Static method in class Quick3way
Rearranges the array in ascending order, using the natural order.
sort(Comparable[]) - Static method in class QuickX
Rearranges the array in ascending order, using the natural order.
sort(Comparable[]) - Static method in class Selection
Rearranges the array in ascending order, using the natural order.
sort(Object[], Comparator) - Static method in class Selection
Rearranges the array in ascending order, using a comparator.
sort(Comparable[]) - Static method in class Shell
Rearranges the array in ascending order, using the natural order.
SparseVector - Class in <Unnamed>
Compilation: javac SparseVector.java Execution: java SparseVector A sparse vector, implementing using a symbol table.
SparseVector(int) - Constructor for class SparseVector
 
ST<Key extends java.lang.Comparable<Key>,Value> - Class in <Unnamed>
The ST class represents an ordered symbol table of generic key-value pairs.
ST() - Constructor for class ST
Initializes an empty symbol table.
Stack<Item> - Class in <Unnamed>
This class is an implementation of a stack of generic items.
Stack() - Constructor for class Stack
Initializes an empty stack.
star(int) - Static method in class GraphGenerator
Returns a star graph on V vertices.
StaticSETofInts - Class in <Unnamed>
The StaticSETofInts class represents a set of integers.
StaticSETofInts(int[]) - Constructor for class StaticSETofInts
Creates a set of integers specified by array keys[].
Stopwatch - Class in <Unnamed>
Stopwatch.
Stopwatch() - Constructor for class Stopwatch
Create a stopwatch object.
stronglyConnected(int, int) - Method in class GabowSCC
Are vertices v and w in the same strong component?
stronglyConnected(int, int) - Method in class KosarajuSharirSCC
Are vertices v and w in the same strong component?
stronglyConnected(int, int) - Method in class TarjanSCC
Are vertices v and w in the same strong component?
SuffixArray - Class in <Unnamed>
 
SuffixArray(String) - Constructor for class SuffixArray
 
SymbolDigraph - Class in <Unnamed>
Compilation: javac SymbolDigraph.java Execution: java SymbolDigraph Dependencies: ST.java Digraph.java In.java % java SymbolDigraph routes.txt " " JFK MCO ATL ORD ATL HOU MCO LAX
SymbolDigraph(String, String) - Constructor for class SymbolDigraph
 
SymbolGraph - Class in <Unnamed>
Compilation: javac SymbolGraph.java Execution: java SymbolGraph filename.txt delimiter Dependencies: ST.java Graph.java In.java StdIn.java StdOut.java Data files: http://algs4.cs.princeton.edu/41undirected/routes.txt http://algs4.cs.princeton.edu/41undirected/movies.txt % java SymbolGraph routes.txt " " JFK MCO ATL ORD LAX PHX LAS % java SymbolGraph movies.txt "/" Tin Men (1987) Hershey, Barbara Geppi, Cindy Jones, Kathy (II) Herr, Marcia ...
SymbolGraph(String, String) - Constructor for class SymbolGraph
 

T

tally() - Method in class Counter
Returns the current value of the counter (i.e., the number of increments since creation).
tan() - Method in class Complex
 
TarjanSCC - Class in <Unnamed>
The TarjanSCC class represents a data type for determining the strong components in a digraph.
TarjanSCC(Digraph) - Constructor for class TarjanSCC
Computes the strong components of the digraph G.
test(double[][], double[], double[]) - Static method in class Simplex
 
test1() - Static method in class Simplex
 
test2() - Static method in class Simplex
 
test3() - Static method in class Simplex
 
test4() - Static method in class Simplex
 
theta() - Method in class Point2D
Returns the angle of this point in polar coordinates.
ThreeSum - Class in <Unnamed>
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 ThreeSum
 
ThreeSumFast - Class in <Unnamed>
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 ThreeSumFast
 
times(Complex) - Method in class Complex
 
times(double) - Method in class Complex
 
times(double) - Method in class Vector
Returns the product of this factor multiplied by the scalar factor: this * factor.
timeToHit(Particle) - Method in class Particle
 
timeToHitHorizontalWall() - Method in class Particle
 
timeToHitVerticalWall() - Method in class Particle
 
timeTrial(int) - Static method in class DoublingRatio
Returns the amount of time to call ThreeSum.count() with N random 6-digit integers.
timeTrial(int) - Static method in class DoublingTest
Returns the amount of time to call ThreeSum.count() with N random 6-digit integers.
to() - Method in class DirectedEdge
Return the vertex where this edge ends.
to() - Method in class FlowEdge
 
toChar(int) - Method in class Alphabet
Converts an index between 0 and R-1 into a char over this alphabet.
toChars(int[]) - Method in class Alphabet
Converts array indices[] that represents a base-R integer into a String over this alphabet.
toIndex(char) - Method in class Alphabet
Converts character c to a number in 0..R-1.
toIndices(String) - Method in class Alphabet
Receives a string s over this alphabet and converts s into a base-R int array.
TopM - Class in <Unnamed>
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 <Unnamed>
The Topological class represents a data type for determining a topological order of a directed acyclic graph (DAG).
Topological(Digraph) - Constructor for class Topological
Determines whether the digraph G has a topological order and, if so, finds such a topological order.
Topological(EdgeWeightedDigraph) - Constructor for class Topological
Determines whether the edge-weighted digraph G has a topological order and, if so, finds such an order.
toString() - Method in class AdjMatrixEdgeWeightedDigraph
 
toString() - Method in class BTree
 
toString() - Method in class Complex
 
toString() - Method in class Counter
Returns a string representation of this counter.
toString() - Method in class Date
Devolve uma string que representa esta data.
toString() - Method in class Digraph
Return a string representation of the digraph.
toString() - Method in class DirectedEdge
Return a string representation of this edge.
toString() - Method in class Edge
Return a string representation of this edge.
toString() - Method in class EdgeWeightedDigraph
Return a string representation of this digraph.
toString() - Method in class EdgeWeightedGraph
Return a string representation of this graph.
toString() - Method in class FlowEdge
 
toString() - Method in class FlowNetwork
 
toString() - Method in class Graph
Returns a string representation of the graph.
toString() - Method in class Interval1D
Returns a string representation of this interval.
toString() - Method in class Interval2D
Returns a string representation of this two-dimensional interval.
toString() - Method in class LinearRegression
Returns a string representation of the simple linear regression model.
toString() - Method in class LinkedQueue
Returns (a string string representing) the sequence of items in the queue, in FIFO order, separated by spaces.
toString() - Method in class LinkedStack
Returns a string representation of this stack.
toString() - Method in class Point2D
Return a string representation of this point.
toString() - Method in class PolynomialRegression
Returns a string representation of the polynomial regression model.
toString() - Method in class Queue
Returns a string representation of this queue.
toString() - Method in class SET
Returns a string representation of this set.
toString() - Method in class SparseVector
 
toString() - Method in class Stack
Returns a string representation of this stack.
toString() - Method in class Transaction
Returns a string representation of the transaction.
toString() - Method in class Vector
Returns a string representation of this vector.
tournament(int) - Static method in class DigraphGenerator
 
Transaction - Class in <Unnamed>
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 Transaction
Initializes a new transaction from the given arguments.
Transaction(String) - Constructor for class Transaction
Initializes a new transaction by parsing a string of the form NAME DATE AMOUNT.
Transaction.HowMuchOrder - Class in <Unnamed>
Compares two transactions by amount.
Transaction.HowMuchOrder() - Constructor for class Transaction.HowMuchOrder
 
Transaction.WhenOrder - Class in <Unnamed>
Compares two transactions by date.
Transaction.WhenOrder() - Constructor for class Transaction.WhenOrder
 
Transaction.WhoOrder - Class in <Unnamed>
Compares two transactions by customer name.
Transaction.WhoOrder() - Constructor for class Transaction.WhoOrder
 
TransitiveClosure - Class in <Unnamed>
Compilation: javac TransitiveClosure.java Execution: java TransitiveClosure filename.txt Dependencies: Digraph.java DepthFirstDirectedPaths.java In.java StdOut.java Data files: http://algs4.cs.princeton.edu/42directed/tinyDG.txt Compute transitive closure of a digraph and support reachability queries.
TransitiveClosure(Digraph) - Constructor for class TransitiveClosure
 
tree(int) - Static method in class GraphGenerator
Returns a uniformly random tree on V vertices.
TrieST<Value> - Class in <Unnamed>
A string symbol table (ST) for ASCII strings, implemented using a 256-way trie.
TrieST() - Constructor for class TrieST
 
TST<Value> - Class in <Unnamed>
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 TST
 

U

UF - Class in <Unnamed>
The UF class represents a union-find data type (also known as the disjoint-sets data type).
UF(int) - Constructor for class UF
Initializes an empty union-find data structure with N isolated components 0 through N-1
UNICODE16 - Static variable in class Alphabet
This is the 65536-character UNICODE alphabet.
union(int, int) - Method in class QuickFindUF
Merge components containing p and q.
union(int, int) - Method in class QuickUnionUF
Merge components containing p and q.
union(SET<Key>) - Method in class SET
Returns the union of this set and that set.
union(int, int) - Method in class UF
Merge the component containing site p with the the component containing site q.
union(int, int) - Method in class WeightedQuickUnionUF
Merge components containing p and q.
UPPERCASE - Static variable in class Alphabet
This is the 26-letter alphabet {A,B,..,X,Y,Z}.

V

V() - Method in class AdjMatrixEdgeWeightedDigraph
 
V() - Method in class Digraph
Return the number of vertices in the digraph.
V() - Method in class EdgeWeightedDigraph
Return the number of vertices in this digraph.
V() - Method in class EdgeWeightedGraph
Return the number of vertices in this graph.
V() - Method in class FlowNetwork
 
V() - Method in class Graph
Returns the number of vertices in this graph.
value() - Method in class FordFulkerson
 
value() - Method in class Simplex
 
Vector - Class in <Unnamed>
The Vector class represents a d-dimensional mathematical vector.
Vector(int) - Constructor for class Vector
Initializes a d-dimensional zero vector.
Vector(double...) - Constructor for class Vector
Initializes a vector from either an array or a vararg list.

W

weight() - Method in class AssignmentProblem
 
weight() - Method in class BoruvkaMST
 
weight() - Method in class DirectedEdge
Return the weight of this edge.
weight() - Method in class Edge
Return the weight of this edge.
weight() - Method in class KruskalMST
 
weight() - Method in class LazyPrimMST
 
weight() - Method in class PrimMST
 
WeightedQuickUnionUF - Class in <Unnamed>
The WeightedQuickUnionUF class represents a union-find data structure.
WeightedQuickUnionUF(int) - Constructor for class WeightedQuickUnionUF
Initializes an empty union-find data structure with N isolated components 0 through N-1.
wheel(int) - Static method in class GraphGenerator
Returns a wheel graph on V vertices.
when() - Method in class Transaction
Returns the date of the transaction.
WhiteFilter - Class in <Unnamed>
This is a client of the SET ADT.
Whitelist - Class in <Unnamed>
The Whitelist class provides a client for reading in a set of integers from a file; reading in a sequence of integers from standard input; and printing to standard output those integers in the whitelist.
Whitelist() - Constructor for class Whitelist
 
who() - Method in class Transaction
Returns the name of the customer involved in the transaction.
wildcardMatch(String) - Method in class TST
 

X

x() - Method in class Point2D
Returns the x-coordinate.
X_ORDER - Static variable in class Point2D
Compares two points by x-coordinate.

Y

y() - Method in class Point2D
Returns the y-coordinate.
Y_ORDER - Static variable in class Point2D
Compares two points by y-coordinate.
year() - Method in class Date
Devolve o ano desta data.
A B C D E F G H I K L M N O P Q R S T U V W X Y