Type Alias ForceGraph

Source
pub type ForceGraph<N, E, Ty = Undirected> = StableGraph<Node<N>, E, Ty>;
Expand description

A helper type that creates a StableGraph with our custom Node as the weight.

Aliased Type§

pub struct ForceGraph<N, E, Ty = Undirected> { /* private fields */ }

Trait Implementations§

Source§

impl<N, E, Ty: EdgeType> ForceGraphHelper<N, E, Ty> for ForceGraph<N, E, Ty>

Source§

fn add_force_node(&mut self, name: impl AsRef<str>, data: N) -> NodeIndex

Add a Node to the graph with only the name and arbitrary data.
Source§

fn add_force_node_with_coords( &mut self, name: impl AsRef<str>, data: N, location: Vec3, ) -> NodeIndex

Add a Node to the graph with the name, arbitrary data, and a custom location.