pub struct GraphoptOptions<'a> {
pub niter: usize,
pub node_charge: f64,
pub node_mass: f64,
pub spring_length: f64,
pub spring_constant: f64,
pub max_sa_movement: f64,
pub initial: Option<&'a Matrix>,
}Expand description
Parameters of the graphopt layout (Graph::layout_graphopt).
The Default uses the original graphopt defaults: 500 iterations,
node charge 0.001, node mass 30, spring length 0, spring constant 1,
maximum movement 5, and a random start.
Fields§
§niter: usizeNumber of iterations (default 500).
node_charge: f64Charge of the vertices, for the electric repulsion (default 0.001).
With zero charge each iteration is only O(|E|).
node_mass: f64Mass of the vertices, for the spring forces (default 30).
spring_length: f64Rest length of the springs (default 0).
spring_constant: f64Spring constant (default 1).
max_sa_movement: f64Maximum movement along an axis in a single step (default 5).
initial: Option<&'a Matrix>Starting positions (n × 2); None starts from a random layout.
Trait Implementations§
Source§impl<'a> Clone for GraphoptOptions<'a>
impl<'a> Clone for GraphoptOptions<'a>
Source§fn clone(&self) -> GraphoptOptions<'a>
fn clone(&self) -> GraphoptOptions<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for GraphoptOptions<'a>
impl<'a> Debug for GraphoptOptions<'a>
Source§impl Default for GraphoptOptions<'_>
impl Default for GraphoptOptions<'_>
Source§impl<'a> PartialEq for GraphoptOptions<'a>
impl<'a> PartialEq for GraphoptOptions<'a>
Source§fn eq(&self, other: &GraphoptOptions<'a>) -> bool
fn eq(&self, other: &GraphoptOptions<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for GraphoptOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for GraphoptOptions<'a>
impl<'a> RefUnwindSafe for GraphoptOptions<'a>
impl<'a> Send for GraphoptOptions<'a>
impl<'a> Sync for GraphoptOptions<'a>
impl<'a> Unpin for GraphoptOptions<'a>
impl<'a> UnsafeUnpin for GraphoptOptions<'a>
impl<'a> UnwindSafe for GraphoptOptions<'a>
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