MatrixFactory

trait MatrixFactory[R <: Int, C <: Int, T]

Central entry point for creating Matrices. Modules implementing the Matrix trait should also provide an instance of this type class.

Central entry point for creating Matrices. Modules implementing the Matrix trait should also provide an instance of this type class.

Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def builder: Builder[R, C, T]

Returns a new Builder instance.

Returns a new Builder instance.

def identity(using R == C =:= true): Matrix[R, C, T]

Creates the identity Matrix.

Creates the identity Matrix.

def ones: Matrix[R, C, T]

Creates a Matrix of ones.

Creates a Matrix of ones.

def rowMajor(elements: T*): Matrix[R, C, T]

Creates a Matrix containing the specified elements, assuming row-major order. Dimensions will be checked at runtime.

Creates a Matrix containing the specified elements, assuming row-major order. Dimensions will be checked at runtime.

def tabulate(fillElem: (Int, Int) => T): Matrix[R, C, T]

Creates a Matrix containing the elements returned by the specified function.

Creates a Matrix containing the elements returned by the specified function.

Value Params
fillElem

function returning the element at the specified position (row index, column index)

def zeros: Matrix[R, C, T]

Creates a Matrix of zeros.

Creates a Matrix of zeros.