|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.algorithms.IterativeProcess
edu.uci.ics.jung.algorithms.importance.AbstractRanker
Abstract class for algorithms that rank nodes or edges by some "importance" metric. Provides a common set of services such as:
By default, all rank scores are removed from the vertices (or edges) being ranked.
Field Summary | |
static java.lang.String |
DEFAULT_EDGE_WEIGHT_KEY
|
Constructor Summary | |
AbstractRanker()
|
Method Summary | |
java.lang.String |
getEdgeWeightKeyName()
the user datum key used to store the edge weight, if any |
java.util.List |
getRankings()
Retrieves the list of ranking instances in descending sorted order by rank score If the algorithm is ranking edges, the instances will be of type EdgeRanking , otherwise
if the algorithm is ranking nodes the instances will be of type NodeRanking |
double |
getRankScore(UserDataContainer v)
Given an edge or node, returns the corresponding rank score. |
abstract java.lang.String |
getRankScoreKey()
The user datum key used to store the rank score. |
cern.colt.list.DoubleArrayList |
getRankScores(int topKRankings)
Return a list of the top k rank scores. |
boolean |
isRankingNodes()
Indicates whether this ranker is ranking nodes or edges. |
void |
printRankings(boolean verbose,
boolean printScore)
Print the rankings to standard out in descending order of rank score |
void |
setNormalizeRankings(boolean normalizeRankings)
Allows the user to specify whether or not s/he wants the rankings to be normalized. |
void |
setRemoveRankScoresOnFinalize(boolean removeRankScoresOnFinalize)
Instructs the ranker whether or not it should remove the rank scores from the nodes (or edges) once the ranks have been computed. |
void |
setUserDefinedEdgeWeightKey(java.lang.String keyName)
Allows the user to provide his own set of data instances as edge weights by giving the ranker the UserDatum key where those instances can be found. |
Methods inherited from class edu.uci.ics.jung.algorithms.IterativeProcess |
evaluate, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, hasConverged, relativePrecision, setDesiredPrecision, setMaximumIterations |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_EDGE_WEIGHT_KEY
Constructor Detail |
public AbstractRanker()
Method Detail |
public boolean isRankingNodes()
true
if the ranker it ranking nodes, false
if it's ranking edgespublic void setRemoveRankScoresOnFinalize(boolean removeRankScoresOnFinalize)
removeRankScoresOnFinalize
- true
if the rank scores are to be removed, false
otherwisepublic java.util.List getRankings()
EdgeRanking
, otherwise
if the algorithm is ranking nodes the instances will be of type NodeRanking
public cern.colt.list.DoubleArrayList getRankScores(int topKRankings)
topKRankings
- the value of k to use
public abstract java.lang.String getRankScoreKey()
public double getRankScore(UserDataContainer v)
setRemoveRankScoresOnFinalize(false)
was called
prior to evaluate()
;
public java.lang.String getEdgeWeightKeyName()
public void printRankings(boolean verbose, boolean printScore)
verbose
- if true
, include information about the actual rank order as well as
the original position of the vertex before it was rankedprintScore
- if true
, include the actual value of the rank scorepublic void setNormalizeRankings(boolean normalizeRankings)
normalizeRankings
- public void setUserDefinedEdgeWeightKey(java.lang.String keyName)
UserDatum
key where those instances can be found.
keyName
- the name of the UserDatum
key where the data instance representing an edge weight
can be found
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |