public abstract class AbstractUncertainObject extends java.lang.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.
|
DISCRETE_UNCERTAIN_OBJECT, UNCERTAIN_OBJECT_FIELD
TYPE
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(java.util.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.
|
java.lang.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(java.util.Random rand)
UncertainObject
drawSample
in interface UncertainObject
rand
- Random generatorpublic int getDimensionality()
SpatialComparable
getDimensionality
in interface FeatureVector<java.lang.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 java.lang.Double getValue(int dimension)
FeatureVector
getValue
in interface FeatureVector<java.lang.Double>
dimension
- the desired dimension, where 0 ≤ dimension ≤
this.getDimensionality()-1
public abstract DoubleVector getCenterOfMass()
UncertainObject
getCenterOfMass
in interface UncertainObject
Copyright © 2019 ELKI Development Team. License information.