Package it.unimi.dsi.law.rank
Class SpectralRanking.NormStoppingCriterion
java.lang.Object
it.unimi.dsi.law.rank.SpectralRanking.NormStoppingCriterion
- All Implemented Interfaces:
SpectralRanking.StoppingCriterion
- Enclosing class:
- SpectralRanking
public static class SpectralRanking.NormStoppingCriterion extends Object implements SpectralRanking.StoppingCriterion
A stopping criterion that evaluates
SpectralRanking.normDelta()
, and stops
if this value is smaller than a given threshold.
Note that this criterion assumes SpectralRanking.normDelta()
has been properly implemented.
-
Constructor Summary
Constructors Constructor Description NormStoppingCriterion(double threshold)
Creates an instance with given threshold. -
Method Summary
Modifier and Type Method Description boolean
shouldStop(SpectralRanking spectralRanking)
Determines if the computation should be stopped.
-
Constructor Details
-
NormStoppingCriterion
public NormStoppingCriterion(double threshold)Creates an instance with given threshold.- Parameters:
threshold
- the threshold.
-
-
Method Details
-
shouldStop
Description copied from interface:SpectralRanking.StoppingCriterion
Determines if the computation should be stopped.- Specified by:
shouldStop
in interfaceSpectralRanking.StoppingCriterion
- Parameters:
spectralRanking
- the instance incapsulating the computation.- Returns:
- true if the computation should be stopped.
-