Struct forceatlas2::Layout[][src]

pub struct Layout<T: Coord> {
    pub edges: Vec<Edge>,
    pub nodes: Vec<Node>,
    pub points: PointList<T>,
    pub speed: T,
    pub speeds: PointList<T>,
    pub old_speeds: PointList<T>,
    // some fields omitted
}

Fields

edges: Vec<Edge>nodes: Vec<Node>points: PointList<T>

List of the nodes’ positions

speed: Tspeeds: PointList<T>old_speeds: PointList<T>

Implementations

impl<'a, T: Coord + Debug> Layout<T> where
    Layout<T>: Repulsion<T>, 
[src]

pub fn from_graph(
    edges: Vec<Edge>,
    nb_nodes: usize,
    settings: Settings<T>
) -> Self where
    Standard: Distribution<T>,
    T: SampleUniform
[src]

Instanciates a randomly positioned layout from an undirected graph

Assumes edges (n1, n2) respect n1 < n2

pub fn from_position_graph<I: Iterator<Item = &'a Position<T>>>(
    edges: Vec<Edge>,
    nodes: I,
    settings: Settings<T>
) -> Self where
    T: 'a, 
[src]

Instanciates layout from an undirected graph, using initial positions

Assumes edges (n1, n2) respect n1 < n2

pub fn get_settings(&self) -> &Settings<T>[src]

pub fn set_settings(&mut self, settings: Settings<T>)[src]

pub fn iteration(&mut self)[src]

Computes an iteration of ForceAtlas2

Auto Trait Implementations

impl<T> RefUnwindSafe for Layout<T> where
    T: RefUnwindSafe

impl<T> Send for Layout<T> where
    T: Send

impl<T> Sync for Layout<T> where
    T: Sync

impl<T> Unpin for Layout<T> where
    T: Unpin

impl<T> UnwindSafe for Layout<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,