Struct forceatlas2::Layout[][src]

pub struct Layout<T: Coord> {
    pub edges: Vec<Edge>,
    pub masses: Vec<T>,
    pub points: PointList<T>,
    pub speeds: PointList<T>,
    pub old_speeds: PointList<T>,
    pub weights: Option<Vec<T>>,
    // some fields omitted
}

Fields

edges: Vec<Edge>masses: Vec<T>points: PointList<T>

List of the nodes’ positions

speeds: PointList<T>old_speeds: PointList<T>weights: Option<Vec<T>>

Implementations

Instanciates a randomly positioned layout from an undirected graph

Assumes edges (n1, n2) respect n1 < n2.

Instanciates layout from an undirected graph, using initial positions

Assumes edges (n1, n2) respect n1 < n2

nodes is a list of coordinates, e.g. [x1, y1, x2, y2, ...].

Changes layout settings

Panics

Panics if settings.dimensions is changed.

Computes an iteration of ForceAtlas2

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.