es.yrbcn.graph.weighted
Class WeightedPageRank.IterationNumberStoppingCriterion

java.lang.Object
  extended by es.yrbcn.graph.weighted.WeightedPageRank.IterationNumberStoppingCriterion
All Implemented Interfaces:
WeightedPageRank.StoppingCriterion
Enclosing class:
WeightedPageRank

public static class WeightedPageRank.IterationNumberStoppingCriterion
extends Object
implements WeightedPageRank.StoppingCriterion

A stopping criterion that stops whenever the number of iterations exceeds a given bound.


Constructor Summary
WeightedPageRank.IterationNumberStoppingCriterion(int maxIter)
          Creates an instance with a given number of iterations.
 
Method Summary
 boolean shouldStop(WeightedPageRank p)
          Determines if the computation should be stopped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeightedPageRank.IterationNumberStoppingCriterion

public WeightedPageRank.IterationNumberStoppingCriterion(int maxIter)
Creates an instance with a given number of iterations.

Parameters:
maxIter - the maximum number of iterations.
Method Detail

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.