pub struct KkParams3d {
pub maxiter: usize,
pub epsilon: f64,
pub kkconst: f64,
pub seed: Option<Vec<[f64; 3]>>,
}Expand description
Parameters for the 3D Kamada-Kawai layout.
Fields§
§maxiter: usizeMaximum number of iterations. Default: 10 * vcount.
epsilon: f64Stop when the maximum energy-gradient magnitude squared falls below this threshold.
kkconst: f64Spring constant K. Default: vcount as f64.
seed: Option<Vec<[f64; 3]>>Optional initial positions (row per vertex: [x, y, z]).
If None, a scaled sphere layout is used.
Implementations§
Source§impl KkParams3d
impl KkParams3d
Sourcepub fn default_for(n: usize) -> Self
pub fn default_for(n: usize) -> Self
Reasonable defaults for a graph with n vertices.
§Examples
use rust_igraph::KkParams3d;
let params = KkParams3d::default_for(50);
assert_eq!(params.maxiter, 500);Trait Implementations§
Source§impl Clone for KkParams3d
impl Clone for KkParams3d
Source§fn clone(&self) -> KkParams3d
fn clone(&self) -> KkParams3d
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KkParams3d
impl RefUnwindSafe for KkParams3d
impl Send for KkParams3d
impl Sync for KkParams3d
impl Unpin for KkParams3d
impl UnsafeUnpin for KkParams3d
impl UnwindSafe for KkParams3d
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