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
pub fn iter_par_nodes(
&mut self,
chunk_size: usize
) -> impl Iterator<Item = impl ParallelIterator<Item = NodeParIter<'_, T>>>
pub fn iter_par_simd_nodes<const N: usize>(
&mut self,
chunk_size: usize
) -> impl Iterator<Item = impl ParallelIterator<Item = NodeParSimdIter<'_, T, N>>>
pub fn from_graph(
edges: Vec<Edge>,
nodes: Nodes<T>,
weights: Option<Vec<T>>,
settings: Settings<T>
) -> Self where
Standard: Distribution<T>,
T: SampleUniform,
pub fn from_graph(
edges: Vec<Edge>,
nodes: Nodes<T>,
weights: Option<Vec<T>>,
settings: Settings<T>
) -> Self where
Standard: Distribution<T>,
T: SampleUniform,
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, ...]
.
Auto Trait Implementations
impl<T> RefUnwindSafe for Layout<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Layout<T> where
T: UnwindSafe,