public abstract class AbstractUncertainObject extends Object implements UncertainObject
UncertainObject
s, providing shared
functionality such as bounding box access and random generation.FeatureVector.Factory<V extends FeatureVector<? extends D>,D>
Modifier and Type | Field and Description |
---|---|
protected SpatialComparable |
bounds
Bounding box of the object.
|
static int |
DEFAULT_TRY_LIMIT
Default retry limit for sampling, to guard against bad parameters.
|
Constructor and Description |
---|
AbstractUncertainObject() |
Modifier and Type | Method and Description |
---|---|
protected static HyperBoundingBox |
computeBounds(NumberVector[] samples)
Compute the bounding box for some samples.
|
abstract DoubleVector |
drawSample(Random rand)
Draw a random sampled instance.
|
abstract DoubleVector |
getCenterOfMass()
Get the center of mass of the uncertain object.
|
int |
getDimensionality()
Returns the dimensionality of the object.
|
double |
getMax(int dimension)
Returns the maximum coordinate at the specified dimension.
|
double |
getMin(int dimension)
Returns the minimum coordinate at the specified dimension.
|
Double |
getValue(int dimension)
Returns the value in the specified dimension.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public static final int DEFAULT_TRY_LIMIT
protected SpatialComparable bounds
protected static HyperBoundingBox computeBounds(NumberVector[] samples)
samples
- Samplespublic abstract DoubleVector drawSample(Random rand)
UncertainObject
drawSample
in interface UncertainObject
rand
- Random generatorpublic int getDimensionality()
SpatialComparable
getDimensionality
in interface FeatureVector<Double>
getDimensionality
in interface SpatialComparable
public double getMin(int dimension)
SpatialComparable
getMin
in interface SpatialComparable
dimension
- the dimension for which the coordinate should be returned,
where 0 ≤ dimension < getDimensionality()
public double getMax(int dimension)
SpatialComparable
getMax
in interface SpatialComparable
dimension
- the dimension for which the coordinate should be returned,
where 0 ≤ dimension < getDimensionality()
public Double getValue(int dimension)
FeatureVector
getValue
in interface FeatureVector<Double>
dimension
- the desired dimension, where 0 ≤ dimension ≤
this.getDimensionality()-1
public abstract DoubleVector getCenterOfMass()
UncertainObject
getCenterOfMass
in interface UncertainObject
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.