object MatrixL extends Error with Serializable
The MatrixL
companion object provides operations for MatrixL
that don't require
'this' (like static methods in Java). It provides factory methods for building
matrices from files or vectors.
- Alphabetic
- By Inheritance
- MatrixL
- Serializable
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ++(u: VectoL, w: VectoL): MatrixL
Concatenate (row) vectors 'u' and 'w' to form a matrix with 2 rows.
Concatenate (row) vectors 'u' and 'w' to form a matrix with 2 rows.
- u
the vector to be concatenated as the new first row in matrix
- w
the vector to be concatenated as the new second row in matrix
- def ++^(u: VectoL, w: VectoL): MatrixL
Concatenate (column) vectors 'u' and 'w' to form a matrix with 2 columns.
Concatenate (column) vectors 'u' and 'w' to form a matrix with 2 columns.
- u
the vector to be concatenated as the new first column in matrix
- w
the vector to be concatenated as the new second column in matrix
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(fileName: String, skip: Int): MatrixL
Create a matrix by reading from a text file, e.g., a CSV file.
Create a matrix by reading from a text file, e.g., a CSV file.
- fileName
the name of file holding the data
- skip
the initial number of lines to skip
- def apply(fileName: String): MatrixL
Create a matrix by reading from a text file, e.g., a CSV file.
Create a matrix by reading from a text file, e.g., a CSV file.
- fileName
the name of file holding the data
- def apply(dim: (Int, Int), u: Long*): MatrixL
Create a symmetric matrix from repeated values in a lower triangular form.
Create a symmetric matrix from repeated values in a lower triangular form.
- dim
the (row, column) dimensions
- u
the repeated values
- def apply(u: Vector[VectoL]): MatrixL
Create a matrix and assign values from the Scala
Vector
of vectors 'u'.Create a matrix and assign values from the Scala
Vector
of vectors 'u'. Assumes vectors are column-wise.- u
the
Vector
of vectors to assign
- def apply(u: Seq[VectoL], columnwise: Boolean = true): MatrixL
Create a matrix and assign values from a sequence/array of vectors 'u'.
Create a matrix and assign values from a sequence/array of vectors 'u'.
- u
the sequence/array of vectors to assign
- columnwise
whether the vectors are treated as column or row vectors
- def apply(u: Array[Array[Long]]): MatrixL
Create a matrix from a two-dimensional array 'u'.
Create a matrix from a two-dimensional array 'u'.
- u
the 2D array for the matrix
- 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()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def eye(m: Int, n: Int = 0): MatrixL
Create an 'm-by-n' identity matrix I (ones on main diagonal, zeros elsewhere).
Create an 'm-by-n' identity matrix I (ones on main diagonal, zeros elsewhere). If 'n' is <= 0, set it to 'm' for a square identity matrix. FIX: store as a diagonal matrix.
- m
the row dimension of the matrix
- n
the column dimension of the matrix (defaults to 0 => square matrix)
- 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
- def form_cw(x: VectoL, y: Long): MatrixL
Form a matrix from a vector 'x' and a scalar 'y', column-wise.
Form a matrix from a vector 'x' and a scalar 'y', column-wise.
- x
the first vector -> column 0
- y
the second scalar -> column 1 (repeat scalar)
- def form_cw(x: Long, y: VectoL): MatrixL
Form a matrix from a scalar 'x' and a vector 'y', column-wise.
Form a matrix from a scalar 'x' and a vector 'y', column-wise.
- x
the first scalar -> column 0 (repeat scalar)
- y
the second vector -> column 1
- def form_cw(x: VectoL, y: VectoL): MatrixL
Form a matrix from two vectors 'x' and 'y', column-wise.
Form a matrix from two vectors 'x' and 'y', column-wise.
- x
the first vector -> column 0
- y
the second vector -> column 1
- def form_rw(x: VectoL, y: Long): MatrixL
Form a matrix from a vector 'x' and a scalar 'y', row-wise.
Form a matrix from a vector 'x' and a scalar 'y', row-wise.
- x
the first vector -> row 0
- y
the second scalar -> row 1 (repeat scalar)
- def form_rw(x: Long, y: VectoL): MatrixL
Form a matrix from scalar 'x' and a vector 'y', row-wise.
Form a matrix from scalar 'x' and a vector 'y', row-wise.
- x
the first scalar -> row 0 (repeat scalar)
- y
the second vector -> row 1
- def form_rw(x: VectoL, y: VectoL): MatrixL
Form a matrix from two vectors 'x' and 'y', row-wise.
Form a matrix from two vectors 'x' and 'y', row-wise.
- x
the first vector -> row 0
- y
the second vector -> row 1
- 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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def outer(x: VectoL, y: VectoL): MatrixL
Compute the outer product of vector 'x' and vector 'y'.
Compute the outer product of vector 'x' and vector 'y'. The result of the outer product is a matrix where 'c(i, j)' is the product of 'i'-th element of 'x' with the 'j'-th element of 'y'.
- x
the first vector
- y
the second vector
- def setSp(sp_: Char): Unit
Reset the separating character from its CSV default.
Reset the separating character from its CSV default.
- sp_
the new separating character
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def times(u: VectoL, a: MatrixL): VectorL
Multiply vector 'u' by matrix 'a'.
Multiply vector 'u' by matrix 'a'. Treat 'u' as a row vector.
- u
the vector to multiply by
- a
the matrix to multiply by (requires 'sameCrossDimensions')
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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