pub struct TrivialModularityOptimizer {
pub parallel_scale: usize,
pub tol: f32,
}Fields§
§parallel_scale: usizeParallel scale
If the node count exceeds this value, the optimizer will use parallel optimization.
tol: f32Tolerance for modularity change
If the modularity change is less than this value, the optimizer will consider the optimization converged.
Trait Implementations§
Source§impl ModularityOptimizer for TrivialModularityOptimizer
impl ModularityOptimizer for TrivialModularityOptimizer
fn is_converged(&mut self, previous: f32, current: f32) -> bool
fn get_parallel_threshold(&self) -> usize
Auto Trait Implementations§
impl Freeze for TrivialModularityOptimizer
impl RefUnwindSafe for TrivialModularityOptimizer
impl Send for TrivialModularityOptimizer
impl Sync for TrivialModularityOptimizer
impl Unpin for TrivialModularityOptimizer
impl UnwindSafe for TrivialModularityOptimizer
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