public class DataPoint
extends java.lang.Object
Constructor and Description |
---|
DataPoint(double[] data)
Initialize a datapoint.
|
Modifier and Type | Method and Description |
---|---|
double |
get(int index)
Get the value at a specified location in this vector.
|
int |
getDimension()
Returns the number of components of the data vector.
|
double[] |
getVector()
Returns the underlying data vector.
|
void |
setData(double[] data)
Set the data vector.
|
java.lang.String |
toString() |
public DataPoint(double[] data)
data
- the data to set this data pointpublic double[] getVector()
public double get(int index)
index
- the index for the data of interestpublic void setData(double[] data)
data
- the new datapublic int getDimension()
public java.lang.String toString()
toString
in class java.lang.Object