Click or drag to resize
CPM Class

The CPM class provides a client that solves the parallel precedence-constrained job scheduling problem via the Critical path method. It reduces the problem to the longest-paths problem in edge-weighted DAGs. It builds an edge-weighted digraph (which must be a DAG) from the job-scheduling problem specification, finds the longest-paths tree, and computes the longest-paths lengths (which are precisely the start times for each job).

This implementation uses to find a longest path in a DAG. The running time is proportional to V + E, where V is the number of jobs and E is the number of precedence constraints.

Inheritance Hierarchy
SystemObject
  Algs4NetCPM

Namespace: Algs4Net
Assembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class CPM

The CPM type exposes the following members.

Methods
  NameDescription
Public methodStatic memberMainTest
Reads the precedence constraints from standard input and prints a feasible schedule to standard output.
Top
Remarks

For additional documentation, see Section 4.4 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

This class is a C# port from the original Java class CPM implementation by the respective authors.

See Also