Package org.gephi.appearance
Class RankingImpl
- java.lang.Object
-
- org.gephi.appearance.RankingImpl
-
- All Implemented Interfaces:
Ranking
- Direct Known Subclasses:
AttributeRankingImpl,DegreeRankingImpl,EdgeWeightRankingImpl
public abstract class RankingImpl extends Object implements Ranking
- Author:
- mbastian
-
-
Field Summary
Fields Modifier and Type Field Description static InterpolatorDEFAULT_INTERPOLATORprotected Interpolatorinterpolator
-
Constructor Summary
Constructors Constructor Description RankingImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.gephi.graph.api.ColumngetColumn()Returns the column associated with this partition.InterpolatorgetInterpolator()floatgetNormalizedValue(org.gephi.graph.api.Element element, org.gephi.graph.api.Graph graph)Returns the element's normalized value for this ranking.abstract booleanisValid(org.gephi.graph.api.Graph graph)floatnormalize(Number value, Interpolator interpolator, Number minValue, Number maxValue)Normalizes the given value with the interpolator.voidsetInterpolator(Interpolator interpolator)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gephi.appearance.api.Ranking
getMaxValue, getMinValue, getValue
-
-
-
-
Field Detail
-
DEFAULT_INTERPOLATOR
public static Interpolator DEFAULT_INTERPOLATOR
-
interpolator
protected Interpolator interpolator
-
-
Method Detail
-
getInterpolator
public Interpolator getInterpolator()
-
setInterpolator
public void setInterpolator(Interpolator interpolator)
-
getNormalizedValue
public float getNormalizedValue(org.gephi.graph.api.Element element, org.gephi.graph.api.Graph graph)Description copied from interface:RankingReturns the element's normalized value for this ranking.- Specified by:
getNormalizedValuein interfaceRanking- Parameters:
element- element to get the value forgraph- graph this element belongs to- Returns:
- the normalized value for this ranking
-
normalize
public float normalize(Number value, Interpolator interpolator, Number minValue, Number maxValue)
Description copied from interface:RankingNormalizes the given value with the interpolator.The value is first put between zero and one by doing
(value - min) / (max - min)and then passed to the given interpolator.
-
isValid
public abstract boolean isValid(org.gephi.graph.api.Graph graph)
-
-