|
|
|||||||||||||||||||||
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<FloatVector,Float>
de.lmu.ifi.dbs.elki.data.FloatVector
public class FloatVector
A FloatVector is to store real values approximately as float values.
Field Summary | |
---|---|
private float[] |
values
Keeps the values of the float 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 | |
---|---|
FloatVector(float[] values)
Provides a FloatVector consisting of the given float values. |
|
FloatVector(Float[] values)
Provides a FloatVector consisting of the given float values. |
|
FloatVector(List<Float> values)
Provides a FloatVector consisting of float values according to the given Float values. |
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. |
Float |
getValue(int dimension)
Returns the value in the specified dimension. |
FloatVector |
multiplicate(double k)
Returns a new FeatureVector that is the result of a scalar multiplication with the given scalar. |
FloatVector |
negativeVector()
Returns the additive inverse to this FeatureVector. |
FloatVector |
newInstance(double[] values)
Returns a new RealVector of N for the given values. |
FloatVector |
nullVector()
Provides a null vector of the same Feature Vector Space as this FeatureVector (that is, of the same dimensionality). |
FloatVector |
plus(FloatVector fv)
Returns a new FeatureVector that is the sum of this FeatureVector and the given FeatureVector. |
FloatVector |
randomInstance(Float min,
Float max,
Random random)
Returns a FeatureVector of T with random values between min and max. |
FloatVector |
randomInstance(Random random)
Returns a new FloatVector 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 float[] values
Constructor Detail |
---|
public FloatVector(List<Float> values)
values
- the values to be set as values of the float vectorpublic FloatVector(float[] values)
values
- the values to be set as values of the float vectorpublic FloatVector(Float[] values)
values
- the values to be set as values of the float vectorMethod Detail |
---|
public FloatVector newInstance(double[] values)
RealVector
newInstance
in class RealVector<FloatVector,Float>
values
- the values of the featureVector
RealVector.newInstance(double[])
public FloatVector randomInstance(Random random)
random
- a Random instance
FeatureVector.randomInstance(java.util.Random)
public FloatVector randomInstance(Float min, Float 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 Float 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 FloatVector plus(FloatVector fv)
FeatureVector
fv
- a FeatureVector to be added to this Featurevector
FeatureVector.plus(FeatureVector)
public FloatVector nullVector()
FeatureVector
FeatureVector.nullVector()
public FloatVector negativeVector()
FeatureVector
FeatureVector.negativeVector()
public FloatVector multiplicate(double k)
FeatureVector
k
- a scalar to multiply this FeatureVector with
FeatureVector.multiplicate(double)
public String toString()
FeatureVector
toString
in interface FeatureVector<FloatVector,Float>
toString
in class Object
FeatureVector.toString()
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |