Package edu.princeton.cs.algs4
Class CPM
 Object

 edu.princeton.cs.algs4.CPM

public class CPM extends Object
TheCPM
class provides a client that solves the parallel precedenceconstrained job scheduling problem via the critical path method. It reduces the problem to the longestpaths problem in edgeweighted DAGs. It builds an edgeweighted digraph (which must be a DAG) from the jobscheduling problem specification, finds the longestpaths tree, and computes the longestpaths lengths (which are precisely the start times for each job).This implementation uses
AcyclicLP
to find a longest path in a DAG. The program takes Θ(V + E) time in the worst case, where V is the number of jobs and E is the number of precedence constraints.For additional documentation, see Section 4.4 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
 Author:
 Robert Sedgewick, Kevin Wayne


Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
Reads the precedence constraints from standard input and prints a feasible schedule to standard output.



Method Detail

main
public static void main(String[] args)
Reads the precedence constraints from standard input and prints a feasible schedule to standard output. Parameters:
args
 the commandline arguments

