slash.matrixf

package slash.matrixf

Members list

Type members

Classlikes

object MatF

This library is fundamentally an adaptation of the Java MatF library, JaMa, by MathWorks Inc. and the National Institute of Standards and Technology.

This library is fundamentally an adaptation of the Java MatF library, JaMa, by MathWorks Inc. and the National Institute of Standards and Technology.

Attributes

Companion
class
Source
MatF.scala
Supertypes
class Object
trait Matchable
class Any
Self type
MatF.type
opaque class MatF[M <: Int, N <: Int](val values: Array[Float])(using x$2: ValueOf[M], x$3: ValueOf[N])

Attributes

Companion
object
Source
MatF.scala
Supertypes
class Object
trait Matchable
class Any
object MatrixFSpace

Attributes

Companion
class
Source
MatrixSpace.scala
Supertypes
class Object
trait Matchable
class Any
Self type
opaque class MatrixFSpace[M0 <: Int, N0 <: Int](val rowVectorFSpace: VectorFSpace[M0], val columnVectorFSpace: VectorFSpace[N0])

Attributes

Companion
object
Source
MatrixSpace.scala
Supertypes
class Object
trait Matchable
class Any
object Util

Attributes

Source
Util.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Util.type

Extensions

Extensions

extension [M <: Int, N <: Int](a: MatF[M, N])(using ValueOf[M], ValueOf[N])
def flatten: VecF[M * N]

values as a Vector.

values as a Vector.

Attributes

Source
package.scala
def reshape[R <: Int, C <: Int](using ValueOf[R], ValueOf[C]): MatF[R, C]

cast matrix as MatF[R,C]

cast matrix as MatF[R,C]

Value parameters

C

new horizontal dimension

R

new vertical dimension

Attributes

Returns

same values, but recast to RxC

Source
package.scala
def toMat: Mat[M, N]

Extension methods for all matrices.

Extension methods for all matrices.

Attributes

Source
package.scala
extension [M <: Int, N <: Int](a: MatF[M, N])(using ValueOf[M], ValueOf[N], ValueOf[Min[M, N]], N =:= M =:= false)
def solve[V <: Int](b: MatF[M, V])(using ValueOf[V]): MatF[N, V]

Solve a * x = b

Solve a * x = b

Value parameters

b

right hand side

Attributes

Returns

least squares solution x = MatF[M, V] such that a * x = b

Source
package.scala
extension [MN <: Int](m: MatF[MN, MN])(using ValueOf[MN])

MatF determinant https://en.wikipedia.org/wiki/Determinant the determinant is nonzero if and only if the matrix is invertible and the linear map represented by the matrix is an isomorphism

MatF determinant https://en.wikipedia.org/wiki/Determinant the determinant is nonzero if and only if the matrix is invertible and the linear map represented by the matrix is an isomorphism

Attributes

Returns

the determinant of this matrix.

Source
package.scala
def inv: MatF[MN, MN]

https://en.wikipedia.org/wiki/Invertible_matrix

https://en.wikipedia.org/wiki/Invertible_matrix

Computes the inverse of Square MatF m.

Attributes

Returns

the inverse of matrix m

Throws
RuntimeException

"MatF is singular." )

Source
package.scala
def solve[V <: Int](b: MatF[MN, V])(using ValueOf[V]): MatF[MN, V]

Solve a * x = b

Solve a * x = b

Value parameters

b

right hand side

Attributes

Returns

x = MatF[MN, V] such that a * x = b

Source
package.scala
extension [M <: Int, N <: Int](m: MatF[M, N])(using ValueOf[M], ValueOf[N], ValueOf[Min[M, N]], (M >= N) =:= true)
def cond: Double

MatF condition (2 norm)

MatF condition (2 norm)

Attributes

Returns

ratio of largest to smallest singular value.

Source
package.scala
def leftInverse: MatF[N, M]

Solve b * m = I[N, N] m = MatF[M, N] with M > N and Rank = N, has a left inverse b = MatF[N, M] such that b * m = I[N, N]

Solve b * m = I[N, N] m = MatF[M, N] with M > N and Rank = N, has a left inverse b = MatF[N, M] such that b * m = I[N, N]

Attributes

Returns

b = MatF[N, M] the Left Inverse of MatF m.

Source
package.scala
def norm2: Double

Two norm

Two norm

Attributes

Returns

maximum singular value.

Source
package.scala
def rank: Int

MatF rank

MatF rank

Attributes

Returns

effective numerical rank, obtained from SV.

Source
package.scala
extension [M <: Int, N <: Int](m: MatF[M, N])(using ValueOf[M], ValueOf[N], ValueOf[Min[M, N]], (N > M) =:= true)
def rightInverse(using ValueOf[Min[M, M]]): MatF[N, M]

m = MatF[M, N] with M < N and Rank = M, has a right inverse b = MatF[N, M] such that m * b = Identity[M, M]

m = MatF[M, N] with M < N and Rank = M, has a right inverse b = MatF[N, M] such that m * b = Identity[M, M]

Attributes

Returns

the Right Inverse of MatF a.

Source
package.scala
extension [M <: Int, N <: Int](m: MatF[M, N])(using ((M == 1) || (N == 1)) =:= true)
def asVector: VecF[M * N]

Attributes

Source
package.scala
inline def copyAsVector[MN <: Int](using (MN == (M * N)) =:= true): VecF[MN]

Attributes

Source
package.scala
extension (m: MatF[_ <: Int, _ <: Int])
def cast[M <: Int, N <: Int](using ValueOf[M], ValueOf[N]): MatF[M, N]

Attributes

Source
package.scala
extension (s: Float)
inline def +[M <: Int, N <: Int](inline m: MatF[M, N])(using ValueOf[M], ValueOf[N]): MatF[M, N]

Support left add / multiply by Scalars

Support left add / multiply by Scalars

Attributes

Source
package.scala
extension [N <: Int](thisVector: VecF[N])(using ValueOf[N])
inline def *[M <: Int](thatMatrix: MatF[N, M])(using ValueOf[M]): MatF[1, M]

Attributes

Source
package.scala
inline def asColumnMatrix: MatF[N, 1]

Attributes

Source
package.scala
inline def asRowMatrix: MatF[1, N]

Attributes

Source
package.scala
def times[M <: Int](thatMatrix: MatF[N, M])(using ValueOf[M]): MatF[1, M]

Attributes

Source
package.scala