matr

package matr

Type members

Classlikes

Companion
object
trait Matrix[R <: Int, C <: Int, T](using `x$1`: R > 0 && C > 0 =:= true)(using vr: ValueOf[R], vc: ValueOf[C])

Represents a matrix in the mathematical sense and is the central type of this library. Row dimension, column dimension and the data type of the elements are set at compile-time. Elements are indexed zero-based. Concrete subclasses of this trait implement immutable storage and access to the elements of the matrix. Implementations for non-mathematical helper methods (mkString etc.) are provided here, but can be overridden. Mathematical operations are handled by type classes.

Represents a matrix in the mathematical sense and is the central type of this library. Row dimension, column dimension and the data type of the elements are set at compile-time. Elements are indexed zero-based. Concrete subclasses of this trait implement immutable storage and access to the elements of the matrix. Implementations for non-mathematical helper methods (mkString etc.) are provided here, but can be overridden. Mathematical operations are handled by type classes.

Matrix elements are indexed according to the following pattern: | 0,0 | 0,1 | 0,2 | 0,colIdx | ... | 0,colDim-1 | | 1,0 | 1,1 | 1,2 | 1,colIdx | ... | ... | | 2,0 | 2,1 | 2,2 | ... | ... | ... | | rowIdx,0 | rowIdx,1 | ... | rowIdx,colIdx | ... | ... | | ... | ... | ... | ... | ... | ... | | rowDim-1,0 | ... | ... | ... | ... | rowDim-1,colDim-1 |

Type Params
C

column dimension

R

row dimension

T

element type

Companion
object
object Matrix
Companion
class
trait MatrixAddition[R <: Int, C <: Int, T]
trait MatrixEquality[R <: Int, C <: Int, T]
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
Companion
class
trait MatrixMultiplication[R <: Int, C <: Int, L <: Int, T, U]
trait MatrixSubtraction[R <: Int, C <: Int, T]
trait Submatrix[RowIdxTL <: Int, ColIdxTL <: Int, RowIdxBR <: Int, ColIdxBR <: Int, R <: Int, C <: Int, T](using `x$1`: RowIdxTL >= 0 && RowIdxTL + 1 < R && ColIdxTL >= 0 && ColIdxTL + 1 < C && RowIdxBR >= RowIdxTL && RowIdxBR < R && ColIdxBR >= ColIdxTL && ColIdxBR < C =:= true)(using `x$2`: RowIdxBR - RowIdxTL + 1 > 0 && ColIdxBR - ColIdxTL + 1 > 0 =:= true)
Companion
object
object Submatrix
Companion
class
trait Transpose[R <: Int, C <: Int, T]