class Tensor3D extends Error with Serializable
The Tensor3D
class is a simple implementation of a 3-dimensional tensor.
The first two dimensions must be fixed and known, while the third dimension
may be dynamically allocated by the user. The third dimension should only
vary with the second dimension, not the first.
-----------------------------------------------------------------------------
- Alphabetic
- By Inheritance
- Tensor3D
- Serializable
- Serializable
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Tensor3D(dim1: Int, dim2: Int, dim3: Int, v: Array[Array[Array[Double]]] = null)
- dim1
size of the 1st level/dimension (sheet) of the tensor
- dim2
size of the 2nd level/dimension (row) of the tensor
- dim3
size of the 3rd level/dimension (column) of the tensor
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
*(b: MatrixD, c: MatrixD, d: MatrixD): Tensor3D
Multiply (multilinear product) 'this' tensor by three matrices 'b', 'c' and 'd'.
Multiply (multilinear product) 'this' tensor by three matrices 'b', 'c' and 'd'.
this * (a, b, c)
- b
the first matrix to multiply by (requires 'leDimensions')
- c
the second matrix to multiply by (requires 'leDimensions')
- d
the thrid matrix to multiply by (requires 'leDimensions')
- See also
www.stat.uchicago.edu/~lekheng/work/icm1.pdf - equation 15.1
-
def
*(s: Double): Tensor3D
Multiply 'this' tensor by scalar 's'.
Multiply 'this' tensor by scalar 's'.
- s
the scalar to multiply by
-
def
**(b: Tensor3D): Tensor3D
Multiply elementwise (Hadamard product) 'this' tensor by tensor 'b'.
Multiply elementwise (Hadamard product) 'this' tensor by tensor 'b'.
- b
the tensor to add (requires 'leDimensions')
-
def
+(b: Tensor3D): Tensor3D
Add 'this' tensor and tensor 'b'.
Add 'this' tensor and tensor 'b'.
- b
the tensor to add (requires 'leDimensions')
-
def
-(b: Tensor3D): Tensor3D
From 'this' tensor subtract tensor 'b'.
From 'this' tensor subtract tensor 'b'.
- b
the tensor to add (requires 'leDimensions')
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(i: Int): MatriD
Retrieve the 'i' matrix from the tensor.
Retrieve the 'i' matrix from the tensor.
- i
1st dimension index of the tensor
-
def
apply(i: Int, j: Int): VectoD
Retrieve the 'i, j' vector from the tensor.
Retrieve the 'i, j' vector from the tensor.
- i
1st dimension index of the tensor
- j
2nd dimension index of the tensor
-
def
apply(i: Int, j: Int, k: Int): Double
Retrieve the 'i, j, k' element from the tensor.
Retrieve the 'i, j, k' element from the tensor.
- i
1st dimension (sheet) index of the tensor
- j
2nd dimension (row) index of the tensor
- k
3rd dimension (column) index of the tensor
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val dim1: Int
- val dim2: Int
- val dim3: Int
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
var
fString: String
Format string used for printing vector values (change using 'setFormat')
Format string used for printing vector values (change using 'setFormat')
- Attributes
- protected
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flaw(method: String, message: String): Unit
Show the flaw by printing the error message.
Show the flaw by printing the error message.
- method
the method where the error occurred
- message
the error message
- Definition Classes
- Error
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
leDimensions(b: Tensor3D): Boolean
Check whether the dimensions of 'this' tensor are less than or equal to 'le' those of the other tensor 'b'.
Check whether the dimensions of 'this' tensor are less than or equal to 'le' those of the other tensor 'b'.
- b
the other matrix
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
set(x: Double): Unit
Set all the tensor element values to 'x'.
Set all the tensor element values to 'x'.
- x
the value to set all elements to
-
def
setFormat(newFormat: String): Unit
Set the format to the 'newFormat'.
Set the format to the 'newFormat'.
- newFormat
the new format string
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
Convert 'this' tensor to a string with a double line break after each sheet and a single line break after each row.
Convert 'this' tensor to a string with a double line break after each sheet and a single line break after each row.
- Definition Classes
- Tensor3D → AnyRef → Any
-
def
toString2: String
Convert 'this' tensor to a string with a line break after each sheet.
-
def
update(i: Int, j: Int, k: Int, x: Double): Unit
Update a single element of the tensor to the given value.
Update a single element of the tensor to the given value.
- i
1st dimension index of the tensor
- j
2nd dimension index of the tensor
- k
3rd dimension index of the tensor
- x
the value to be updated at the above position in the tensor
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )