Class FlowGraph

java.lang.Object
com.tnsai.coordination.flow.FlowGraph

public final class FlowGraph extends Object
Directed acyclic graph representing agent flow routing. Produced by FlowDSL.parse(String).
  • Constructor Details

    • FlowGraph

      public FlowGraph()
  • Method Details

    • nodes

      public Set<String> nodes()
      All agent names in the graph, in declaration order.
    • successors

      public Set<String> successors(String node)
      Outgoing edges: which agents does this agent feed into?
    • predecessors

      public Set<String> predecessors(String node)
      Incoming edges: which agents feed into this agent?
    • roots

      public List<String> roots()
      Agents with no incoming edges — the entry points.
    • leaves

      public List<String> leaves()
      Agents with no outgoing edges — the exit points.
    • dependenciesOf

      public List<String> dependenciesOf(String node)
      Dependencies for a given node (same as predecessors).
    • topologicalOrder

      public List<String> topologicalOrder()
      Returns a topological ordering of nodes.
    • edgeCount

      public int edgeCount()
      Total number of edges.
    • toString

      public String toString()
      Overrides:
      toString in class Object