GraphLayout
Mojo struct 🡭
GraphLayout
@memory_only
struct GraphLayoutWhere Mark.GRAPH puts its nodes (#157).
GraphLayout.CIRCLE(the default): evenly spaced around a circle, in first-seen order. Every node is equally easy to find, and the picture does not depend on the edges.GraphLayout.FORCE: a force-directed layout. Every pair of nodes repels and every edge pulls its two ends together, so connected nodes gather and clusters separate – the shape of the network, rather than a fixed ring.
Aliases
CIRCLE = GraphLayout(Int(0))FORCE = GraphLayout(Int(1))
Implemented traits
AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable
Methods
__init__
fn def __init__(out self, value: Int)Args:
- value (
Int) - self (
Self)
Returns:
Self
__eq__
fn def __eq__(self, other: Self) -> BoolArgs:
- self (
Self) - other (
Self)
Returns:
Bool