Class ScoringUtils
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.scoring.util.ScoringUtils
-
public class ScoringUtils extends java.lang.Object
Methods for assigning values (to be interpreted as prior probabilities) to vertices in the context of random-walk-based scoring algorithms.
-
-
Constructor Summary
Constructors Constructor Description ScoringUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> com.google.common.base.Function<V,HITS.Scores>
getHITSUniformRootPrior(java.util.Collection<V> roots)
Returns a Function that hub and authority values of 1/roots.size()
to each element ofroots
.static <V> com.google.common.base.Function<V,java.lang.Double>
getUniformRootPrior(java.util.Collection<V> roots)
Assigns a probability of 1/roots.size()
to each of the elements ofroots
.
-
-
-
Method Detail
-
getUniformRootPrior
public static <V> com.google.common.base.Function<V,java.lang.Double> getUniformRootPrior(java.util.Collection<V> roots)
Assigns a probability of 1/roots.size()
to each of the elements ofroots
.- Type Parameters:
V
- the vertex type- Parameters:
roots
- the vertices to be assigned nonzero prior probabilities- Returns:
- a Function assigning a uniform prior to each element in
roots
-
getHITSUniformRootPrior
public static <V> com.google.common.base.Function<V,HITS.Scores> getHITSUniformRootPrior(java.util.Collection<V> roots)
Returns a Function that hub and authority values of 1/roots.size()
to each element ofroots
.- Type Parameters:
V
- the vertex type- Parameters:
roots
- the vertices to be assigned nonzero scores- Returns:
- a Function that assigns uniform prior hub/authority probabilities to each root
-
-