Skip to main content

banded

Function banded 

Source
pub fn banded(
    nodes: &[GraphNode],
    edges: &[GraphEdge],
    p: &BandedParams,
) -> GraphLayout
Expand description

Lay out a graph in horizontal bands (a factor graph’s layers: control, parameters, states, observations, …), left to right. A column is a step along an edge within a band; an edge into another band keeps the column, so a branch drops straight down (or up) into its band — the state chain stays one straight row with each observation below its state. A leaf hanging off one node of its band (an observed variable under its factor) sits right below it; nodes dropping in from other bands side by side fan out over the band’s free columns. Nodes that still share a band and a column stack in tracks, a node staying on the track of the node before it in its band. A source is pulled right to just before its first successor in its band (a constant next to its factor). Edges are straight; a cycle’s closing edge is drawn as is and marked back.