Package elki.result

Class ScalesResult


  • public class ScalesResult
    extends java.lang.Object
    Class to keep shared scales across visualizers.
    Since:
    0.5.0
    Author:
    Erich Schubert
    • Field Detail

      • scales

        private LinearScale[] scales
        The scales in use.
    • Constructor Detail

      • ScalesResult

        public ScalesResult​(Relation<? extends SpatialComparable> relation)
        Constructor.
        Parameters:
        relation - Relation to use
      • ScalesResult

        public ScalesResult​(LinearScale[] scales)
        Constructor.
        Parameters:
        scales - Relation scales to use
    • Method Detail

      • getScale

        public LinearScale getScale​(int dim)
        Get the scale for dimension dim (starting at 1!).
        Parameters:
        dim - Dimension
        Returns:
        Scale
      • setScale

        public void setScale​(int dim,
                             LinearScale scale)
        Set the scale for dimension dim (starting at 1!). Note: you still need to trigger an event. This is not done automatically, as you might want to set more than one scale!
        Parameters:
        dim - Dimension
        scale - New scale
      • getScales

        public LinearScale[] getScales()
        Get all scales. Note: you must not modify the array.
        Returns:
        Scales array.
      • getScalesResult

        public static ScalesResult getScalesResult​(Relation<? extends SpatialComparable> rel)
        Get (or create) a scales result for a relation.
        Parameters:
        rel - Relation
        Returns:
        associated scales result