Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities
Class ModifiableHyperBoundingBox

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.HyperBoundingBox
      extended by de.lmu.ifi.dbs.elki.utilities.ModifiableHyperBoundingBox
All Implemented Interfaces:
Externalizable, Serializable

public class ModifiableHyperBoundingBox
extends HyperBoundingBox

MBR class allowing modifications (as opposed to HyperBoundingBox).

Author:
Marisa Thoma
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          Serial version
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.HyperBoundingBox
max, min
 
Constructor Summary
ModifiableHyperBoundingBox()
          Constructor
ModifiableHyperBoundingBox(double[] min, double[] max)
          Creates a ModifiableHyperBoundingBox for the given hyper points.
ModifiableHyperBoundingBox(HyperBoundingBox hbb)
          Uses the references to the fields in hbb as min, max fields.
 
Method Summary
 double[] getMaxRef()
          Returns the reference to the maximum hyper point.
 double[] getMinRef()
          Returns a reference to the minimum hyper point.
 void setMax(int dimension, double value)
          Set the maximum bound in dimension dimension to value value.
 void setMin(int dimension, double value)
          Set the minimum bound in dimension dimension to value value.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.HyperBoundingBox
centroid, centroid, contains, contains, equals, getDimensionality, getMax, getMax, getMin, getMin, hashCode, intersects, overlap, perimeter, readExternal, toString, toString, union, volume, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial version

See Also:
Constant Field Values
Constructor Detail

ModifiableHyperBoundingBox

public ModifiableHyperBoundingBox()
Constructor


ModifiableHyperBoundingBox

public ModifiableHyperBoundingBox(HyperBoundingBox hbb)
Uses the references to the fields in hbb as min, max fields. Thus, this constructor indirectly provides a way to modify the fields of a HyperBoundingBox. FIXME: that isn't really nice and should be handled with care.

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
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

Release 0.3 (2010-03-31_1612)