Interface Ranking


  • public interface Ranking
    Ranking configuration for numerical attributes.

    This interface has underlying access to the elements value so it can return the minimum and maximum values.

    • Method Detail

      • getMinValue

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

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

        Number getValue​(Element element,
                        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​(Element element,
                                 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

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