pub struct ForceDirectedLayout {
pub iterations: usize,
pub repulsion_strength: f64,
pub attraction_strength: f64,
pub cooling_rate: f64,
pub radius: f64,
}Fields§
§iterations: usize§repulsion_strength: f64§attraction_strength: f64§cooling_rate: f64§radius: f64Implementations§
Source§impl ForceDirectedLayout
impl ForceDirectedLayout
pub fn new() -> Self
pub fn with_iterations(self, n: usize) -> Self
pub fn with_repulsion(self, f: f64) -> Self
pub fn with_attraction(self, f: f64) -> Self
pub fn with_cooling(self, f: f64) -> Self
pub fn with_radius(self, r: f64) -> Self
Trait Implementations§
Source§impl Default for ForceDirectedLayout
impl Default for ForceDirectedLayout
Source§impl<T: Clone> LayoutStrategy<T> for ForceDirectedLayout
impl<T: Clone> LayoutStrategy<T> for ForceDirectedLayout
Source§fn layout(
&self,
items: &[T],
mapper: &dyn DimensionMapper<Item = T>,
) -> LayoutResult<T>
fn layout( &self, items: &[T], mapper: &dyn DimensionMapper<Item = T>, ) -> LayoutResult<T>
Computes positions for all
items using mapper to derive their natural positions.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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more