IData
public class DataTensor extends java.lang.Object implements IData
All arithmetic methods throw ClassCastException if given a Data instance that is not of this type.
Modifier and Type | Class | Description |
---|---|---|
static class |
DataTensor.DataInfoTensor |
|
static class |
DataTensor.DataInfoTensorFactory |
Constructor | Description |
---|---|
DataTensor(Space space) |
Constructs a new instance with the given DataInfo, wrapping a new Tensor
instance from the given space.
|
Modifier and Type | Method | Description |
---|---|---|
void |
assignTo(double[] array) |
Returns a new array formed by the elements of the wrapped tensor.
|
void |
DE(double y) |
Divide-equals (*=) operation.
|
void |
DE(IData y) |
Divide-equals (/=) operation.
|
void |
E(double y) |
Sets all tensor elements to the given value.
|
void |
E(IData y) |
Copies the elements of the given tensor (wrapped in the Data object) to
this vector.
|
int |
getLength() |
Returns the number of elements in the wrapped tensor.
|
double |
getValue(int i) |
Returns the i-th tensor value, indexing across the first row, then the
second, etc.
|
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 tensor values.
|
public final Tensor x
public DataTensor(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