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 booleanshouldStop(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.StoppingCriterionDetermines if the computation should be stopped.- Specified by:
shouldStopin interfaceSpectralRanking.StoppingCriterion- Parameters:
spectralRanking- the instance incapsulating the computation.- Returns:
- true if the computation should be stopped.
-