pub struct ForceDirectedLayout { /* private fields */ }Expand description
Force-directed layout engine
Implementations§
Source§impl ForceDirectedLayout
impl ForceDirectedLayout
Sourcepub fn with_iterations(self, iterations: usize) -> Self
pub fn with_iterations(self, iterations: usize) -> Self
Sets the number of simulation iterations.
Sourcepub fn with_spring_strength(self, strength: f64) -> Self
pub fn with_spring_strength(self, strength: f64) -> Self
Sets the strength of the attractive spring forces.
Sourcepub fn with_repulsion_strength(self, strength: f64) -> Self
pub fn with_repulsion_strength(self, strength: f64) -> Self
Sets the strength of the repulsive forces between nodes.
Trait Implementations§
Source§impl Default for ForceDirectedLayout
impl Default for ForceDirectedLayout
Source§impl LayoutEngine for ForceDirectedLayout
impl LayoutEngine for ForceDirectedLayout
Source§fn layout(
&self,
nodes: &[LayoutNode],
edges: &[LayoutEdge],
config: &LayoutConfig,
) -> Result<Layout>
fn layout( &self, nodes: &[LayoutNode], edges: &[LayoutEdge], config: &LayoutConfig, ) -> Result<Layout>
Lays out nodes using a force-directed simulation.
Auto Trait Implementations§
impl Freeze for ForceDirectedLayout
impl RefUnwindSafe for ForceDirectedLayout
impl Send for ForceDirectedLayout
impl Sync for ForceDirectedLayout
impl Unpin for ForceDirectedLayout
impl UnsafeUnpin for ForceDirectedLayout
impl UnwindSafe for ForceDirectedLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more