pub struct LeadingEigenvectorStep<'a> { /* private fields */ }Expand description
The state passed to the callback of
Graph::community_leading_eigenvector_with after each eigenvector
computation.
Implementations§
Source§impl LeadingEigenvectorStep<'_>
impl LeadingEigenvectorStep<'_>
Sourcepub fn membership(&self) -> &[i64]
pub fn membership(&self) -> &[i64]
The current membership vector, before applying the split implied by this eigenvector.
Sourcepub fn eigenvalue(&self) -> f64
pub fn eigenvalue(&self) -> f64
The leading eigenvalue just found; the community is split only if it is positive.
Sourcepub fn eigenvector(&self) -> &[f64]
pub fn eigenvector(&self) -> &[f64]
The corresponding eigenvector, with one element per vertex of the community (in increasing vertex id order).
Sourcepub fn multiply(&self, x: &[f64]) -> Result<Vec<f64>>
pub fn multiply(&self, x: &[f64]) -> Result<Vec<f64>>
Multiplies x by the (generalized) modularity matrix of the community
being split, i.e. runs the ARPACK matrix-vector product igraph used to
find this eigenvector. x must have the length of
eigenvector.
For instance step.multiply(step.eigenvector()) is
eigenvalue * eigenvector up to numerical accuracy.
§Errors
If x has a wrong length.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Send for LeadingEigenvectorStep<'a>
impl<'a> !Sync for LeadingEigenvectorStep<'a>
impl<'a> Freeze for LeadingEigenvectorStep<'a>
impl<'a> RefUnwindSafe for LeadingEigenvectorStep<'a>
impl<'a> Unpin for LeadingEigenvectorStep<'a>
impl<'a> UnsafeUnpin for LeadingEigenvectorStep<'a>
impl<'a> UnwindSafe for LeadingEigenvectorStep<'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