IData
, java.io.Serializable
public class DataVector extends java.lang.Object implements IData, java.io.Serializable
All arithmetic methods throw ClassCastException if given a Data instance that is not of this type.
Modifier and Type | Class | Description |
---|---|---|
static class |
DataVector.DataInfoVector |
|
static class |
DataVector.DataInfoVectorFactory |
Constructor | Description |
---|---|
DataVector(Space space) |
Constructs a new instance with the given DataInfo, wrapping a new Vector
instance from the given space.
|
Modifier and Type | Method | Description |
---|---|---|
void |
assignTo(double[] array) |
Assigns the elements of the wrapped vector to the given array.
|
void |
DE(double y) |
Divide-equals (*=) operation.
|
void |
DE(IData y) |
Divide-equals (/=) operation.
|
void |
E(double y) |
Sets all vector elements to the given value.
|
void |
E(IData y) |
Copies the elements of the given vector (wrapped in the Data object)
to this vector.
|
int |
getLength() |
Returns the number of elements in the wrapped vector.
|
double |
getValue(int i) |
Returns the i-th vector value.
|
boolean |
isNaN() |
Returns true if any vector element is not-a-number, as given by Double.isNaN.
|
void |
map(IFunction function) |
Maps the function on all vector elements, replacing each with the
value given by the function applied to it.
|
void |
ME(IData y) |
Minus-equals (-=) operation.
|
void |
PE(double y) |
Plus-equals (+=) operation.
|
void |
PE(IData y) |
Plus-equals (+=) operation.
|
void |
TE(double y) |
Times-equals (*=) operation.
|
void |
TE(IData y) |
Times-equals (*=) operation.
|
java.lang.String |
toString() |
Returns a string formed from the dataInfo label and the vector values.
|
public final Vector x
public DataVector(Space space)
space
- used to construct the wrapped Vectorpublic void E(IData y)
public void E(double y)
public void ME(IData y)
public void PE(IData y)
public void TE(IData y)
public void DE(IData y)
public void PE(double y)
public void TE(double y)
public void DE(double y)
public boolean isNaN()
public void map(IFunction function)
public int getLength()
public double getValue(int i)
public void assignTo(double[] array)
public java.lang.String toString()
toString
in class java.lang.Object