pub struct DavidsonHarelOptions<'a> {
pub maxiter: usize,
pub fineiter: Option<usize>,
pub cool_fact: f64,
pub weight_node_dist: f64,
pub weight_border: f64,
pub weight_edge_lengths: Option<f64>,
pub weight_edge_crossings: Option<f64>,
pub weight_node_edge_dist: Option<f64>,
pub initial: Option<&'a Matrix>,
}Expand description
Parameters of the Davidson–Harel layout (Graph::layout_davidson_harel).
The Default follows the igraph documentation, where d is the density
of the graph (edge directions ignored): 10 annealing iterations,
max(10, log2 n) fine tuning iterations, cooling factor 0.75, node
distance weight 1, border weight 0, edge length weight d / 10, edge
crossing weight 1 - sqrt(d), node-edge distance weight (1 - d) / 5.
Fields§
§maxiter: usizeNumber of annealing iterations (default 10).
fineiter: Option<usize>Number of fine tuning iterations; None means max(10, log2 n).
cool_fact: f64Cooling factor, in (0, 1) (default 0.75).
weight_node_dist: f64Weight of the node-node distance energy term (default 1).
weight_border: f64Weight of the distance-from-border term (default 0: vertices may sit on the border).
weight_edge_lengths: Option<f64>Weight of the edge length term; None means density / 10.
weight_edge_crossings: Option<f64>Weight of the edge crossing term; None means 1 - sqrt(density).
weight_node_edge_dist: Option<f64>Weight of the node-edge distance term; None means (1 - density) / 5.
initial: Option<&'a Matrix>Starting positions (n × 2); None starts from a random layout.
Trait Implementations§
Source§impl<'a> Clone for DavidsonHarelOptions<'a>
impl<'a> Clone for DavidsonHarelOptions<'a>
Source§fn clone(&self) -> DavidsonHarelOptions<'a>
fn clone(&self) -> DavidsonHarelOptions<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for DavidsonHarelOptions<'a>
impl<'a> Debug for DavidsonHarelOptions<'a>
Source§impl Default for DavidsonHarelOptions<'_>
impl Default for DavidsonHarelOptions<'_>
Source§impl<'a> PartialEq for DavidsonHarelOptions<'a>
impl<'a> PartialEq for DavidsonHarelOptions<'a>
Source§fn eq(&self, other: &DavidsonHarelOptions<'a>) -> bool
fn eq(&self, other: &DavidsonHarelOptions<'a>) -> bool
self and other values to be equal, and is used by ==.