| Modifier and Type | Class and Description |
|---|---|
static class |
Dag.DagNode<T>
DagNode is essentially a job within a Dag, usually they are used interchangeably.
|
| Constructor and Description |
|---|
Dag(List<Dag.DagNode<T>> dagNodes) |
| Modifier and Type | Method and Description |
|---|---|
Dag<T> |
concatenate(Dag<T> other)
Concatenate two dags together.
|
Dag<T> |
concatenate(Dag<T> other,
Set<Dag.DagNode<T>> forkNodes)
Concatenate two dags together.
|
List<Dag.DagNode<T>> |
getChildren(Dag.DagNode node) |
Set<Dag.DagNode<T>> |
getDependencyNodes(Set<Dag.DagNode<T>> forkNodes)
This method computes a set of
Dag.DagNodes which are the dependency nodes for concatenating this Dag
with any other Dag. |
List<Dag.DagNode<T>> |
getParents(Dag.DagNode node) |
boolean |
isEmpty() |
Dag<T> |
merge(Dag<T> other)
Merge the "other" dag to "this" dag and return "this" dag as a forest of the two dags.
|
String |
toString() |
public Dag(List<Dag.DagNode<T>> dagNodes)
public List<Dag.DagNode<T>> getChildren(Dag.DagNode node)
public List<Dag.DagNode<T>> getParents(Dag.DagNode node)
public Set<Dag.DagNode<T>> getDependencyNodes(Set<Dag.DagNode<T>> forkNodes)
Dag.DagNodes which are the dependency nodes for concatenating this Dag
with any other Dag. The set of dependency nodes is the union of:
forkNodes - set of nodes of this Dag which are forkablepublic boolean isEmpty()
public Dag<T> concatenate(Dag<T> other)
other - dag to concatenate to this dagpublic Dag<T> concatenate(Dag<T> other, Set<Dag.DagNode<T>> forkNodes)
other - dag to concatenate to this dagforkNodes - a set of nodes from this dag which are marked as forkable nodes. Each of these nodes will be added
to the list of end nodes of the concatenated dag. Essentially, a forkable node has no dependents
in the concatenated dag.public Dag<T> merge(Dag<T> other)
other - dag to merge to this dag