es.yrbcn.graph.weighted
Class WeightedPageRank.NormDeltaStoppingCriterion
java.lang.Object
es.yrbcn.graph.weighted.WeightedPageRank.NormDeltaStoppingCriterion
- All Implemented Interfaces:
- WeightedPageRank.StoppingCriterion
- Enclosing class:
- WeightedPageRank
public static class WeightedPageRank.NormDeltaStoppingCriterion
- extends Object
- implements WeightedPageRank.StoppingCriterion
A stopping criterion that evaluates the norm of the difference between the last two iterates, and stops
if this value is smaller than a given threshold.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WeightedPageRank.NormDeltaStoppingCriterion
public WeightedPageRank.NormDeltaStoppingCriterion(double threshold)
- Creates an instance with given threshold.
- Parameters:
threshold
- the threshold.
shouldStop
public boolean shouldStop(WeightedPageRank p)
- Description copied from interface:
WeightedPageRank.StoppingCriterion
- Determines if the computation should be stopped.
- Specified by:
shouldStop
in interface WeightedPageRank.StoppingCriterion
- Parameters:
p
- the PageRank object.
- Returns:
- true iff the computation should be stopped.