Module

Hylograph.Flow.Render.Laws

Package
purescript-hylograph-flow-render
Repository
afcondon/purescript-hylograph-flow-render

What must hold of any layout of any projection, as a function that returns what does not. Here, and not in a test directory, so that every adapter's tests can hold the layout of its own real flows to it.

#faults Source

faults :: forall wire. Metrics -> Widths wire -> Projection wire -> Layout wire -> Array String

Every fault in a layout of a projection, in words; none is the law.

  • each node of the projection has exactly one place, and each edge one;
  • every number is finite and every box is inside the picture;
  • no two node boxes overlap;
  • an edge that goes forward ends to the right of where it starts, in a later layer; where the projection has no cycle, every edge does;
  • an edge is as wide as its width says, at unit pixels to the unit; the edges on one side of a node stand inside the node and beside one another, and the node is as tall as the wider side. (Checked where every width is positive.)

#layoutFaults Source

layoutFaults :: forall wire. Metrics -> Widths wire -> Projection wire -> Array String

The faults of the layout this package makes of a projection.

#acyclic Source

acyclic :: forall wire. Projection wire -> Boolean

No path of edges returns to where it began (an edge from a node to itself is such a path).

#varied Source

varied :: forall wire. Widths wire

Widths that differ from edge to edge and mean nothing, for holding the layout to its laws on a flow whose wires carry no quantity: the number of wires an edge stands for, and a half more where its source's key is below its target's.