Record Class FixedDAG<T>
java.lang.Object
java.lang.Record
jdk.jpackage.internal.pipeline.FixedDAG<T>
- Record Components:
edgeMatrix
- the edge matrix. [i,j] addresses an edge, where 'i' is the index of the head node of the edge in the node container and 'j' is the index of the tail node of the edge in the node containernodes
- the node container
Fixed directed acyclic graph (DAG).
Number of nodes is fixed, links between nodes can be added or removed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static interface
-
Constructor Summary
ConstructorsConstructorDescriptionFixedDAG
(BinaryMatrix edgeMatrix, FixedDAG.Nodes<T> nodes) Creates an instance of aFixedDAG
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <U> FixedDAG.Builder
<U> build()
static <U> FixedDAG
<U> create
(Collection<DirectedEdge<U>> edges, List<U> nodes) void
void
Returns the value of theedgeMatrix
record component.final boolean
Indicates whether some other object is "equal to" this one.getAllHeadsOf
(T node) getAllTailsOf
(T node) getHeadsOf
(T node) Gets the list of nodes that are heads of the edges sharing the same tail, which is the given node.Get the list of nodes without incoming edges.Get the list of nodes without outgoing edges.getTailsOf
(T node) Gets the list of nodes that are tails of the edges sharing the same head, which is the given node.final int
hashCode()
Returns a hash code value for this object.nodes()
Returns the value of thenodes
record component.Returns topologically ordered nodes of this graph.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
FixedDAG
Creates an instance of aFixedDAG
record class.- Parameters:
edgeMatrix
- the value for theedgeMatrix
record componentnodes
- the value for thenodes
record component
-
-
Method Details
-
build
-
create
-
topologicalSort
-
getAllHeadsOf
-
getAllTailsOf
-
getHeadsOf
Gets the list of nodes that are heads of the edges sharing the same tail, which is the given node.The returned list is ordered by the indexes of the nodes in the node container of this graph.
- Parameters:
node
- a node- Returns:
- the list of nodes that are heads of the edges sharing the same tail, which is the given node
- See Also:
-
getTailsOf
Gets the list of nodes that are tails of the edges sharing the same head, which is the given node.The returned list is ordered by the indexes of the nodes in the node container of this graph.
- Parameters:
node
- a node- Returns:
- the list of nodes that are tails of the edges sharing the same head, which is the given node
- See Also:
-
getNoIncomingEdges
Get the list of nodes without incoming edges.A node without incoming edges is a node that is not a head of any of the edges in the graph.
The returned list is ordered by the indexes of the nodes in the node container of this graph.
- Returns:
- the list of nodes without incoming edges
-
getNoOutgoingEdges
Get the list of nodes without outgoing edges.A node without outgoing edges is a node that is not a tail of any of the edges in the graph.
The returned list is ordered by the indexes of the nodes in the node container of this graph.
- Returns:
- the list of nodes without outgoing edges
-
dumpToStdout
public void dumpToStdout() -
dump
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
edgeMatrix
Returns the value of theedgeMatrix
record component.- Returns:
- the value of the
edgeMatrix
record component
-
nodes
-