|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Number
org.lsmp.djep.vectorJep.values.Tensor
Represents tensor (generalisation of Matrix/Vector).
Constructor Summary | |
Tensor(Dimensions dims)
Creates a Tensor with the given dimension. |
|
Tensor(int len,
Dimensions dims)
Creates a tensor with dimensions [len,dims[0],... |
|
Tensor(Tensor t)
Creates a Tensor with same dimension as the arguments. |
Method Summary | |
protected void |
bufferAppend(java.lang.StringBuffer sb,
int currank)
Recursive procedure to print the tensor with lots of brackets. |
double |
doubleValue()
value of constant ele(1). |
boolean |
equals(java.lang.Object obj)
|
float |
floatValue()
value of constant ele(1). |
Dimensions |
getDim()
Returns the dimension of this object. |
java.lang.Object |
getEle(int i)
gets the i-th element, treats data a a linear array. |
static MatrixValueI |
getInstance(Dimensions dims)
Factory method to return a new Vector, Matrix or Tensor with the given dimensions. |
static MatrixValueI |
getInstance(int rows,
Dimensions dims)
|
int |
getNumEles()
The total number of elements. |
int |
hashCode()
Always override hashCode when you override equals. |
int |
intValue()
value of constant ele(1). |
long |
longValue()
value of constant ele(1). |
void |
setEle(int i,
java.lang.Object value)
sets the i-th element, treats data a a linear array. |
void |
setEles(MatrixValueI val)
sets the elements to those of the arguments. |
java.lang.String |
toString()
Returns a string rep of tensor. |
Methods inherited from class java.lang.Number |
byteValue, shortValue |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Tensor(Dimensions dims)
public Tensor(Tensor t)
public Tensor(int len, Dimensions dims)
Method Detail |
public Dimensions getDim()
MatrixValueI
getDim
in interface MatrixValueI
public int getNumEles()
MatrixValueI
getNumEles
in interface MatrixValueI
public void setEle(int i, java.lang.Object value)
MatrixValueI
setEle
in interface MatrixValueI
public java.lang.Object getEle(int i)
MatrixValueI
getEle
in interface MatrixValueI
public void setEles(MatrixValueI val)
setEles
in interface MatrixValueI
public static MatrixValueI getInstance(Dimensions dims)
public static MatrixValueI getInstance(int rows, Dimensions dims)
protected void bufferAppend(java.lang.StringBuffer sb, int currank)
public java.lang.String toString()
public int intValue()
public long longValue()
public float floatValue()
public double doubleValue()
public boolean equals(java.lang.Object obj)
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |