|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.data.AbstractDatabaseObject
de.lmu.ifi.dbs.elki.data.NumberVector<V,N>
de.lmu.ifi.dbs.elki.data.RealVector<DoubleVector,Double>
de.lmu.ifi.dbs.elki.data.DoubleVector
public class DoubleVector
A DoubleVector is to store real values approximately as double values.
Field Summary | |
---|---|
private double[] |
values
Keeps the values of the real vector |
Fields inherited from class de.lmu.ifi.dbs.elki.data.NumberVector |
---|
ATTRIBUTE_SEPARATOR |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug |
Constructor Summary | |
---|---|
DoubleVector(double[] values)
Provides a DoubleVector consisting of the given double values. |
|
DoubleVector(Double[] values)
Provides a DoubleVector consisting of the given double values. |
|
DoubleVector(List<Double> values)
Provides a feature vector consisting of double values according to the given Double values. |
|
DoubleVector(Matrix columnMatrix)
Expects a matrix of one column. |
Method Summary | |
---|---|
Vector |
getColumnVector()
Returns a Vector representing in one column and getDimensionality() rows the values of this FeatureVector. |
int |
getDimensionality()
The dimensionality of the vector space whereof this FeatureVector is an element. |
Matrix |
getRowVector()
Returns a Matrix representing in one row and getDimensionality() columns the values of this
FeatureVector. |
Double |
getValue(int dimension)
Returns the value in the specified dimension. |
DoubleVector |
multiplicate(double k)
Returns a new FeatureVector that is the result of a scalar multiplication with the given scalar. |
DoubleVector |
negativeVector()
Returns the additive inverse to this FeatureVector. |
DoubleVector |
newInstance(double[] values)
Returns a new RealVector of N for the given values. |
DoubleVector |
nullVector()
Provides a null vector of the same Feature Vector Space as this FeatureVector (that is, of the same dimensionality). |
DoubleVector |
plus(DoubleVector fv)
Returns a new FeatureVector that is the sum of this FeatureVector and the given FeatureVector. |
DoubleVector |
randomInstance(Double min,
Double max,
Random random)
Returns a FeatureVector of T with random values between min and max. |
DoubleVector |
randomInstance(Random random)
Returns a new DoubleVector with values between 0 and 1. |
String |
toString()
Returns a String representation of the FeatureVector as a line that is suitable to be printed in a sequential file. |
Methods inherited from class de.lmu.ifi.dbs.elki.data.NumberVector |
---|
equals, getAttributes, getMax, getMin, newInstance |
Methods inherited from class de.lmu.ifi.dbs.elki.data.AbstractDatabaseObject |
---|
getID, setID |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.data.DatabaseObject |
---|
getID, setID |
Methods inherited from interface de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialObject |
---|
getID |
Field Detail |
---|
private double[] values
Constructor Detail |
---|
public DoubleVector(List<Double> values)
values
- the values to be set as values of the real vectorpublic DoubleVector(double[] values)
values
- the values to be set as values of theDoubleVectorpublic DoubleVector(Double[] values)
values
- the values to be set as values of theDoubleVectorpublic DoubleVector(Matrix columnMatrix)
columnMatrix
- a matrix of one columnMethod Detail |
---|
public DoubleVector newInstance(double[] values)
RealVector
newInstance
in class RealVector<DoubleVector,Double>
values
- the values of the featureVector
RealVector.newInstance(double[])
public DoubleVector randomInstance(Random random)
random
- a Random instance
FeatureVector.randomInstance(Random)
public DoubleVector randomInstance(Double min, Double max, Random random)
FeatureVector
min
- minimum of random valuemax
- maximu of random valuerandom
- a random instance
FeatureVector.randomInstance(Number, Number, java.util.Random)
public int getDimensionality()
FeatureVector
FeatureVector.getDimensionality()
public Double getValue(int dimension)
FeatureVector
dimension
- the desired dimension, where 1 ≤ dimension ≤
this.getDimensionality()
FeatureVector.getValue(int)
public Vector getColumnVector()
FeatureVector
getDimensionality()
rows the values of this FeatureVector.
getDimensionality()
rows the values of this
FeatureVectorFeatureVector.getColumnVector()
public Matrix getRowVector()
FeatureVector
getDimensionality()
columns the values of this
FeatureVector.
getDimensionality()
columns the values of this
FeatureVectorFeatureVector.getRowVector()
public DoubleVector plus(DoubleVector fv)
FeatureVector
fv
- a FeatureVector to be added to this Featurevector
FeatureVector.plus(de.lmu.ifi.dbs.elki.data.FeatureVector)
public DoubleVector nullVector()
FeatureVector
FeatureVector.nullVector()
public DoubleVector negativeVector()
FeatureVector
FeatureVector.negativeVector()
public DoubleVector multiplicate(double k)
FeatureVector
k
- a scalar to multiply this FeatureVector with
FeatureVector.multiplicate(double)
public String toString()
FeatureVector
toString
in interface FeatureVector<DoubleVector,Double>
toString
in class Object
FeatureVector.toString()
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |