Expand description
Predicates implementing stopping conditions.
The implementation of layered label propagation requires a predicate to stop the algorithm. This module provides a few such predicates: they evaluate to true if the updates should be stopped.
You can combine the predicates using the and
and or
methods provided by
the Predicate
trait.
§Examples
use predicates::prelude::*;
use webgraph::algo::llp::preds::{MinGain, MaxUpdates};
let mut predicate = MinGain::try_from(0.001)?.boxed();
predicate = predicate.or(MaxUpdates::from(100)).boxed();
Structs§
- MaxUpdates
- Stop after at most the provided number of updates for a given ɣ.
- MinAvg
Improv - Stop if the average improvement of the gain of the objective function on a window of ten updates is below the given threshold.
- MinGain
- Stop if the gain of the objective function is below the given threshold.
- MinModified
- Stop after the number of modified nodes falls below the square root of the number of nodes.
- Perc
Modified - Stop after the number of modified nodes falls below a specified percentage of the number of nodes.