class Tensor3D extends Error with Serializable
The Tensor3D
class is a simple implementation for 3-dimensional tensors.
The names of the dimensions corresponds to MATLAB (row, column, sheet).
- Alphabetic
- By Inheritance
- Tensor3D
- Serializable
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Tensor3D(u: Array[Array[Array[Double]]])
Construct a tensor from three dimensional array.
Construct a tensor from three dimensional array.
- u
the three dimensional array
- new Tensor3D(dim1: Int)
Construct a 'dim1' by 'dim1' by 'dim1' cubic tensor.
Construct a 'dim1' by 'dim1' by 'dim1' cubic tensor.
- dim1
the row and column dimension
- new Tensor3D(dim1: Int, dim2: Int, dim3: Int, v: Array[Array[Array[Double]]] = null)
- dim1
size of the 1st level/dimension (row) of the tensor (height)
- dim2
size of the 2nd level/dimension (column) of the tensor (width)
- dim3
size of the 3rd level/dimension (sheet) of the tensor (depth)
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 +(s: Double): Tensor3D
Add 'this' tensor and scalar 's'.
Add 'this' tensor and scalar 's'.
- s
the scalar to add
- def +(b: Tensor3D): Tensor3D
Add 'this' tensor and tensor 'b'.
Add 'this' tensor and tensor 'b'.
- b
the tensor to add (requires 'leDimensions')
- def -(s: Double): Tensor3D
From 'this' tensor subtract scalar 's'.
From 'this' tensor subtract scalar 's'.
- s
the scalar to add
- 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(is: Ints, js: Ints, ks: Ints): Tensor3D
Retrieve the 'is, js, ks' row-column-sheet selections from the tensor.
Retrieve the 'is, js, ks' row-column-sheet selections from the tensor.
- is
1st dimension (row) indices of the tensor (null => all)
- js
2nd dimension (column) indices of the tensor (null => all)
- ks
3rd dimension (sheet) indices of the tensor
- def apply(is: Ints, js: Ints): Tensor3D
Retrieve the 'is, js' row-column selections from the tensor.
Retrieve the 'is, js' row-column selections from the tensor.
- is
1st dimension (row) indices of the tensor (null => all)
- js
2nd dimension (column) indices of the tensor
- def apply(is: Ints): Tensor3D
Retrieve the 'is' row selections from the tensor.
Retrieve the 'is' row selections from the tensor.
- is
1st dimension (row) indices of the tensor
- def apply(ii: Int2, jj: Int2, kk: Int2): Tensor3D
Retrieve the 'ii._1' to 'ii._2', 'jj._1' to 'jj._2', 'kk._1' to 'kk._2' row-column-sheet slice of the tensor.
Retrieve the 'ii._1' to 'ii._2', 'jj._1' to 'jj._2', 'kk._1' to 'kk._2' row-column-sheet slice of the tensor.
- ii
1st dimension (row) indices of the tensor (null => all)
- jj
2nd dimension (column) indices of the tensor (null => all)
- kk
3rd dimension (sheet) indices of the tensor
- def apply(ii: Int2, jj: Int2): Tensor3D
Retrieve the 'ii._1' to 'ii._2', 'jj._1' to 'jj._2' row-column slice of the tensor.
Retrieve the 'ii._1' to 'ii._2', 'jj._1' to 'jj._2' row-column slice of the tensor.
- ii
1st dimension (row) indices of the tensor (null => all)
- jj
2nd dimension (column) indices of the tensor
- def apply(ii: Int2): Tensor3D
Retrieve the 'ii._1' to 'ii._2' row slice of the tensor.
Retrieve the 'ii._1' to 'ii._2' row slice of the tensor.
- ii
1st dimension (row) indices of the tensor
- def apply(i: Int): MatriD
Retrieve the 'i' matrix from the tensor.
Retrieve the 'i' matrix from the tensor.
- i
1st dimension (row) 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 (row) index of the tensor
- j
2nd dimension (column) 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 (row) index of the tensor
- j
2nd dimension (column) index of the tensor
- k
3rd dimension (sheet) index of the tensor
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val dim1: Int
- val dim2: Int
- val dim3: Int
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): 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
- final def flaw(method: String, message: String): Unit
- Definition Classes
- Error
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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
- def not(is: Ints, js: Ints, ks: Ints): Tensor3D
Retrieve the complement of the 'is' row selections from the tensor.
Retrieve the complement of the 'is' row selections from the tensor.
- is
1st dimension (row) indices of the tensor
- js
2nd dimension (column) indices of the tensor
- ks
3rd dimension (sheet) indices of the tensor
- def not(is: Ints, js: Ints): Tensor3D
Retrieve the complement of the 'is' row selections from the tensor.
Retrieve the complement of the 'is' row selections from the tensor.
- is
1st dimension (row) indices of the tensor
- js
2nd dimension (column) indices of the tensor
- def not(is: Ints): Tensor3D
Retrieve the complement of the 'is' row selections from the tensor.
Retrieve the complement of the 'is' row selections from the tensor.
- is
1st dimension (row) indices of the tensor
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val range1: Range
- val range2: Range
- val range3: Range
- 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, x: MatrixD): Unit
Update a single matrix of the tensor to the given matrix.
Update a single matrix of the tensor to the given matrix.
- i
1st dimension (row) index of the tensor
- x
the matrix to be updated at the above position in the tensor
- def update(i: Int, j: Int, x: VectorD): Unit
Update a single vector of the tensor to the given vector.
Update a single vector of the tensor to the given vector.
- i
1st dimension (row) index of the tensor
- j
2nd dimension (column) index of the tensor
- x
the vector to be updated at the above position in the tensor
- 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 (row) index of the tensor
- j
2nd dimension (column) index of the tensor
- k
3rd dimension (sheet) index of the tensor
- x
the value to be updated at the above position in the tensor
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated