pub struct VertexInfluence {
pub vertex_id: u32,
pub influences: Vec<(String, f32)>,
}Expand description
For a single vertex: which targets affect it and their delta magnitudes.
Fields§
§vertex_id: u32§influences: Vec<(String, f32)>(target_name, delta_magnitude) sorted by magnitude descending.
Implementations§
Source§impl VertexInfluence
impl VertexInfluence
Sourcepub fn total_magnitude(&self) -> f32
pub fn total_magnitude(&self) -> f32
Total influence magnitude across all targets.
Sourcepub fn dominant_target(&self) -> Option<&str>
pub fn dominant_target(&self) -> Option<&str>
Name of the strongest influencing target, or None if no influences.
Trait Implementations§
Source§impl Clone for VertexInfluence
impl Clone for VertexInfluence
Source§fn clone(&self) -> VertexInfluence
fn clone(&self) -> VertexInfluence
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 VertexInfluence
impl RefUnwindSafe for VertexInfluence
impl Send for VertexInfluence
impl Sync for VertexInfluence
impl Unpin for VertexInfluence
impl UnsafeUnpin for VertexInfluence
impl UnwindSafe for VertexInfluence
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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