Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Graph_InitialNodeLayoutStrategy

mattt edited this page Nov 16, 2020 · 2 revisions

Graph.InitialNodeLayoutStrategy

startType has the syntax (style)?(seed)?. If style is present, it must be one of the strings "regular", "self", or "random". In the first case, the nodes are placed regularly about a circle. In the second case, an abbreviated version of neato is run to obtain the initial layout. In the last case, the nodes are placed randomly in a unit square.

public enum InitialNodeLayoutStrategy

If seed is present, it specifies a seed for the random number generator. If seed is a positive number, this is used as the seed. If it is anything else, the current time, and possibly the process id, is used to pick a seed, thereby making the choice more random. In this case, the seed value is stored in the graph.

If the value is just "random", a time-based seed is chosen.

Note that input positions, specified by a node's pos attribute, are only used when the style is "random"

Inheritance

Hashable

Enumeration Cases

regular

case regular

`self`

case `self`

random

case random(seed: Int? = nil)
Clone this wiki locally