Package elki.data

Class ModifiableHyperBoundingBox

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serial version.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ModifiableHyperBoundingBox

        public ModifiableHyperBoundingBox()
        Constructor.
      • ModifiableHyperBoundingBox

        public ModifiableHyperBoundingBox​(SpatialComparable hbb)
        Derive a bounding box from a spatial object.
        Parameters:
        hbb - existing hyperboundingbox
      • ModifiableHyperBoundingBox

        public ModifiableHyperBoundingBox​(double[] min,
                                          double[] max)
        Creates a ModifiableHyperBoundingBox for the given hyper points.
        Parameters:
        min - - the coordinates of the minimum hyper point
        max - - the coordinates of the maximum hyper point
      • ModifiableHyperBoundingBox

        public ModifiableHyperBoundingBox​(int dim,
                                          double min,
                                          double max)
        Create a ModifiableHyperBoundingBox with given min and max.
        Parameters:
        dim - Dimensionality
        min - Minimum in each dimension
        max - Maximum in each dimension
    • Method Detail

      • setMax

        public void setMax​(int dimension,
                           double value)
        Set the maximum bound in dimension dimension to value value.
        Parameters:
        dimension - the dimension for which the coordinate should be set, where 1 ≤ dimension ≤ this.getDimensionality()
        value - the coordinate to set as upper bound for dimension dimension
      • setMin

        public void setMin​(int dimension,
                           double value)
        Set the minimum bound in dimension dimension to value value.
        Parameters:
        dimension - the dimension for which the lower bound should be set, where 1 ≤ dimension ≤ this.getDimensionality()
        value - the coordinate to set as lower bound for dimension dimension
      • getMinRef

        public double[] getMinRef()
        Returns a reference to the minimum hyper point.
        Returns:
        the minimum hyper point
      • getMaxRef

        public double[] getMaxRef()
        Returns the reference to the maximum hyper point.
        Returns:
        the maximum hyper point
      • set

        public void set​(SpatialComparable obj)
        Set the bounding box to the same as some other spatial object.
        Parameters:
        obj - Spatial object to set to.
      • extend

        public boolean extend​(SpatialComparable obj)
        Extend the bounding box by some other spatial object.
        Parameters:
        obj - Spatial object to extend with
        Returns:
        true when the MBR changed.