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 StringEvery 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
unitpixels 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 StringThe faults of the layout this package makes of a projection.
#acyclic Source
acyclic :: forall wire. Projection wire -> BooleanNo path of edges returns to where it began (an edge from a node to itself is such a path).