|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.data.AbstractNumberVector<IntegerVector,Integer>
de.lmu.ifi.dbs.elki.data.IntegerVector
public class IntegerVector

An IntegerVector is to store integer values.
| Field Summary | |
|---|---|
private int[] |
values
Keeps the values of the real vector |
| Fields inherited from class de.lmu.ifi.dbs.elki.data.AbstractNumberVector |
|---|
ATTRIBUTE_SEPARATOR |
| Constructor Summary | |
|---|---|
|
IntegerVector(double[] values)
Provides an IntegerVector consisting of the given double values. |
|
IntegerVector(int[] values)
Provides an IntegerVector consisting of the given integer values. |
private |
IntegerVector(int[] values,
boolean nocopy)
Private constructor. |
|
IntegerVector(Integer[] values)
Provides an IntegerVector consisting of the given integer values. |
|
IntegerVector(List<Integer> values)
Provides a feature vector consisting of int values according to the given Integer values. |
|
IntegerVector(Vector values)
Provides an IntegerVector consisting of the given double vectors values. |
| Method Summary | |
|---|---|
double |
doubleValue(int dimension)
Returns the value of the specified attribute. |
IntegerVector |
fromByteBuffer(ByteBuffer buffer)
Deserialize an object from a byte buffer (e.g. disk) |
int |
getByteSize(IntegerVector vec)
Get the size of the object in bytes. |
Vector |
getColumnVector()
Returns a Vector representing in one column and getDimensionality() rows the values of this NumberVector of V. |
int |
getDimensionality()
The dimensionality of the vector space where of this FeatureVector of V is an element. |
Matrix |
getRowVector()
Returns a Matrix representing in one row and getDimensionality() columns the values of this NumberVector of
V. |
Integer |
getValue(int dimension)
Returns the value of the specified attribute. |
int[] |
getValues()
Get a copy of the raw int[] array. |
long |
longValue(int dimension)
Returns the value of the specified attribute as long. |
IntegerVector |
minus(IntegerVector fv)
Returns a new NumberVector of V that is the sum of this NumberVector of V and the negativeVector() of given NumberVector of V. |
IntegerVector |
multiplicate(double k)
Returns a new NumberVector of V that is the result of a scalar multiplication with the given scalar. |
IntegerVector |
negativeVector()
Returns the additive inverse to this NumberVector of V. |
IntegerVector |
newInstance(double[] values)
Returns a new NumberVector of N for the given values. |
IntegerVector |
newInstance(Integer[] values)
Returns a new FeatureVector of V for the given values. |
IntegerVector |
newInstance(List<Integer> values)
Returns a new FeatureVector of V for the given values. |
IntegerVector |
newInstance(Vector values)
Returns a new NumberVector of N for the given values. |
IntegerVector |
nullVector()
Provides a null vector of the same Vector Space as this NumberVector of V (that is, of the same dimensionality). |
IntegerVector |
plus(IntegerVector fv)
Returns a new NumberVector of V that is the sum of this NumberVector of V and the given NumberVector of V. |
Integer |
scalarProduct(IntegerVector d)
Provides the scalar product (inner product) of this and the given IntegerVector. |
void |
toByteBuffer(ByteBuffer buffer,
IntegerVector vec)
Serialize the object to a byte array (e.g. disk) |
String |
toString()
Returns a String representation of the FeatureVector of V as a line that is suitable to be printed in a sequential file. |
| Methods inherited from class de.lmu.ifi.dbs.elki.data.AbstractNumberVector |
|---|
byteValue, equals, floatValue, getMax, getMin, hashCode, intValue, shortValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int[] values
| Constructor Detail |
|---|
private IntegerVector(int[] values,
boolean nocopy)
public IntegerVector(List<Integer> values)
values - the values to be set as values of the integer vectorpublic IntegerVector(int[] values)
values - the values to be set as values of the IntegerVectorpublic IntegerVector(Integer[] values)
values - the values to be set as values of the IntegerVectorpublic IntegerVector(double[] values)
values - the values to be set as values of the IntegerVectorpublic IntegerVector(Vector values)
values - the values to be set as values of the IntegerVector| Method Detail |
|---|
public int getDimensionality()
FeatureVector
getDimensionality in interface FeatureVector<IntegerVector,Integer>getDimensionality in interface SpatialComparablepublic Integer getValue(int dimension)
getValue in interface FeatureVector<IntegerVector,Integer>dimension - the selected attribute. Attributes are counted starting
with 1.
IllegalArgumentException - if the specified dimension is out of range
of the possible attributespublic double doubleValue(int dimension)
doubleValue in interface NumberVector<IntegerVector,Integer>dimension - the selected attribute. Attributes are counted starting
with 1.
IllegalArgumentException - if the specified dimension is out of range
of the possible attributespublic long longValue(int dimension)
longValue in interface NumberVector<IntegerVector,Integer>dimension - the selected attribute. Attributes are counted starting
with 1.
IllegalArgumentException - if the specified dimension is out of range
of the possible attributespublic int[] getValues()
public Vector getColumnVector()
NumberVectorgetDimensionality() rows the values of this NumberVector of V.
getColumnVector in interface NumberVector<IntegerVector,Integer>getDimensionality() rows the values of this
NumberVector of Vpublic Matrix getRowVector()
NumberVectorgetDimensionality() columns the values of this NumberVector of
V.
getRowVector in interface NumberVector<IntegerVector,Integer>getDimensionality() columns the values of this
NumberVector of Vpublic IntegerVector plus(IntegerVector fv)
NumberVector
plus in interface NumberVector<IntegerVector,Integer>fv - a NumberVector of V to be added to this NumberVector of V
public IntegerVector minus(IntegerVector fv)
NumberVector
minus in interface NumberVector<IntegerVector,Integer>fv - a NumberVector of V to be subtracted to this NumberVector of V
public IntegerVector nullVector()
NumberVector
nullVector in interface NumberVector<IntegerVector,Integer>public IntegerVector negativeVector()
NumberVector
negativeVector in interface NumberVector<IntegerVector,Integer>public IntegerVector multiplicate(double k)
NumberVector
multiplicate in interface NumberVector<IntegerVector,Integer>k - a scalar to multiply this NumberVector of V with
public Integer scalarProduct(IntegerVector d)
scalarProduct in interface NumberVector<IntegerVector,Integer>d - the IntegerVector to compute the scalar product for
public String toString()
FeatureVector
toString in interface FeatureVector<IntegerVector,Integer>toString in class Objectpublic IntegerVector newInstance(Vector values)
NumberVector
newInstance in interface NumberVector<IntegerVector,Integer>values - the values of the NumberVector
public IntegerVector newInstance(Integer[] values)
FeatureVector
newInstance in interface FeatureVector<IntegerVector,Integer>values - the values of the featureVector
public IntegerVector newInstance(double[] values)
NumberVector
newInstance in interface NumberVector<IntegerVector,Integer>values - the values of the NumberVector
public IntegerVector newInstance(List<Integer> values)
FeatureVector
newInstance in interface FeatureVector<IntegerVector,Integer>values - the values of the featureVector
public IntegerVector fromByteBuffer(ByteBuffer buffer)
throws IOException
ByteBufferSerializer
fromByteBuffer in interface ByteBufferSerializer<IntegerVector>buffer - Data array to process
IOException
public void toByteBuffer(ByteBuffer buffer,
IntegerVector vec)
throws IOException
ByteBufferSerializer
toByteBuffer in interface ByteBufferSerializer<IntegerVector>buffer - Buffer to serialize tovec - Object to serialize
IOExceptionpublic int getByteSize(IntegerVector vec)
ByteBufferSerializer
getByteSize in interface ByteBufferSerializer<IntegerVector>vec - Object to serialize
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||