T
- Type of Node/Task IDR
- Type of Node/Task resultpublic interface Graph<T extends Comparable<T>,R>
Modifier and Type | Interface and Description |
---|---|
static class |
Graph.Node<T,R>
A node representation in this graph, every node may have set of incoming edges and outgoing edges, a node is represented by unique value
|
static class |
Graph.NodeStatus
Represents node's execution status
|
Modifier and Type | Method and Description |
---|---|
void |
addDependency(T evalFirstValue,
T evalAfterValue)
Should add the two nodes in the datastructure in such a way that
evalFirstValue should be evaluated before evalAfterValue . |
void |
addIndependent(T nodeValue)
Adds the given node to the datastructure whith out any dependency
Nodes should be created only if it is not already added.
|
Collection<Graph.Node<T,R>> |
allNodes()
Returns all nodes in this graph
|
Set<Graph.Node<T,R>> |
getInitialNodes()
Returns the Set of nodes for which there is no incoming dependencies.
|
Set<Graph.Node<T,R>> |
getLeafNodes()
Retruns the set of nodes for which there is no outgoing dependencies.
|
int |
size()
Returns the total number of nodes in this graph
|
void addDependency(T evalFirstValue, T evalAfterValue)
evalFirstValue
should be evaluated before evalAfterValue
.
Nodes should be created only if it is not already added.evalFirstValue
- evalAfterValue
- void addIndependent(T nodeValue)
nodeValue
- Set<Graph.Node<T,R>> getInitialNodes()
Set<Graph.Node<T,R>> getLeafNodes()
Collection<Graph.Node<T,R>> allNodes()
int size()
Copyright © 2016 Dexecutor. All rights reserved.