Interface Ranking

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.gephi.graph.api.Column getColumn()
      Returns the column associated with this partition.
      Number getMaxValue​(org.gephi.graph.api.Graph graph)
      Returns the maximum value in this ranking.
      Number getMinValue​(org.gephi.graph.api.Graph graph)
      Returns the minimum value in this ranking.
      float getNormalizedValue​(org.gephi.graph.api.Element element, org.gephi.graph.api.Graph graph)
      Returns the element's normalized value for this ranking.
      Number getValue​(org.gephi.graph.api.Element element, org.gephi.graph.api.Graph graph)
      Returns the element's value for this ranking.
      float normalize​(Number value, Interpolator interpolator, Number minValue, Number maxValue)
      Normalizes the given value with the interpolator.
    • Method Detail

      • getMinValue

        Number getMinValue​(org.gephi.graph.api.Graph graph)
        Returns the minimum value in this ranking.
        Parameters:
        graph - graph to query
        Returns:
        minimum value
      • getMaxValue

        Number getMaxValue​(org.gephi.graph.api.Graph graph)
        Returns the maximum value in this ranking.
        Parameters:
        graph - graph to query
        Returns:
        maximum value
      • getValue

        Number getValue​(org.gephi.graph.api.Element element,
                        org.gephi.graph.api.Graph graph)
        Returns the element's value for this ranking.
        Parameters:
        element - element to get the value for
        graph - graph this element belongs to
        Returns:
        the value for this ranking
      • getNormalizedValue

        float getNormalizedValue​(org.gephi.graph.api.Element element,
                                 org.gephi.graph.api.Graph graph)
        Returns the element's normalized value for this ranking.
        Parameters:
        element - element to get the value for
        graph - graph this element belongs to
        Returns:
        the normalized value for this ranking
      • normalize

        float normalize​(Number value,
                        Interpolator interpolator,
                        Number minValue,
                        Number maxValue)
        Normalizes 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.

        Parameters:
        value - value to normalize
        interpolator - interpolator
        Returns:
        normalized value
      • getColumn

        org.gephi.graph.api.Column getColumn()
        Returns the column associated with this partition.
        Returns:
        column or null if partition not based on a column