Interface Traversal

  • All Known Subinterfaces:
    All Known Implementing Classes:
    Compose, Concat, EmptyTraversal$, EnterIsland, ExitIsland$, MaterializeAtomic, Pop$, PopAttributes$, PushAttributes, PushNotUsed$, Transform

    public interface Traversal

    Graphs to be materialized are defined by their traversal. There is no explicit graph information tracked, instead a sequence of steps required to "reconstruct" the graph.

    "Reconstructing" a graph here has a very clear-cut definition: assign a gapless range of integers from 0..connectionCount to inputs and outputs of modules, so that those that are wired together receive the same number (and those which are not receive different numbers). This feature can be used to - materialize a graph, using the slots as indices to an array of Publishers/Subscribers that need to be wired together - fuse a graph, using the slots to construct a which uses a similar layout - create a DOT formatted output for visualization - convert the graph to another data structure

    The Traversal is designed to be position independent so that multiple traversals can be composed relatively simply. This particular feature also avoids issues with multiply imported modules where the identity must be encoded somehow. The two imports don't need any special treatment as they are at different positions in the traversal. See MaterializeAtomic and comments in for more details.

    • Method Detail

      • concat

        Traversal concat​(Traversal that)
        Concatenates two traversals building a new Traversal which traverses both.
      • rewireFirstTo

        Traversal rewireFirstTo​(int relativeOffset)