matr

package matr

Members list

Packages

package matr.util

Type members

Classlikes

trait Determinant[R <: Int, C <: Int, T](using x$1: IsSquare[R, C])

Type class for calculating the determinant of a Matrix.

Type class for calculating the determinant of a Matrix.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait ElementDivision[A, B]

Type class for the division of Matrix elements. It is provided because, unlike scala.math.Numeric, it allows the result type to be calculated at compile-time.

Type class for the division of Matrix elements. It is provided because, unlike scala.math.Numeric, it allows the result type to be calculated at compile-time.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait ElementMultiplication[A, B]

Type class for the multiplication of Matrix elements. It is provided because, unlike scala.math.Numeric, it allows the result type to be calculated at compile-time.

Type class for the multiplication of Matrix elements. It is provided because, unlike scala.math.Numeric, it allows the result type to be calculated at compile-time.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait Inverse[R <: Int, C <: Int, T](using x$1: IsSquare[R, C])

Type class for calculating the inverse of a Matrix.

Type class for calculating the inverse of a Matrix.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Matrix[R <: Int, C <: Int, T](using x$1: ValueOf[R], x$2: ValueOf[C], x$3: NonNegativeDimensions[R, 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 parameters

C

column dimension

R

row dimension

T

element type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Builder[R, C, T]
Self type
Matrix[R, C, T]
object Matrix

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Matrix.type
trait MatrixAddition[R <: Int, C <: Int, T]

Type class for the addition of Matrices.

Type class for the addition of Matrices.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait MatrixEquality[R <: Int, C <: Int, T]

Type class for testing two Matrices on equality.

Type class for testing two Matrices on equality.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait MatrixFactory[R <: Int, C <: Int, T](using x$1: ValueOf[R], x$2: ValueOf[C], x$3: Numeric[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.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object MatrixFactory

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait MatrixMultiplication[R <: Int, C <: Int, L <: Int, T, U, X](using x$1: Aux[T, U, X])

Type class for the multiplication (calculating the dot product) of Matrices. The result's element type will be calculated at compile-time, based on the element type of the operands.

Type class for the multiplication (calculating the dot product) of Matrices. The result's element type will be calculated at compile-time, based on the element type of the operands.

Type parameters

C

Column dimension of the left-hand side operand and row dimension of the right-hand side operand

L

Column dimension of the right-hand side operand

R

Row dimension of the left-hand side operand

T

Element type of the left-hand side operand

U

Element type of the right-hand side operand

X

Element type of the result

Attributes

Supertypes
class Object
trait Matchable
class Any
case class MatrixNotInvertibleException() extends ArithmeticException

Attributes

Supertypes
trait Product
trait Equals
class ArithmeticException
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
trait MatrixSubtraction[R <: Int, C <: Int, T]

Type class for the subtraction of Matrices.

Type class for the subtraction of Matrices.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Submatrix[RowIdxTL <: Int, ColIdxTL <: Int, RowIdxBR <: Int, ColIdxBR <: Int, R <: Int, C <: Int, T](using x$1: WindowWithinShape[RowIdxTL, ColIdxTL, RowIdxBR, ColIdxBR, R, C], x$2: NonNegativeDimensions[(RowIdxBR - RowIdxTL) + 1, (ColIdxBR - ColIdxTL) + 1])

Type class for getting the submatrix of a Matrix.

Type class for getting the submatrix of a Matrix.

Type parameters

C

Column dimension of the original Matrix

ColIdxBR

Column index of the element that should become the bottom-right element of the submatrix

ColIdxTL

Column index of the element that should become the top-left element of the submatrix

R

Row dimension of the original Matrix

RowIdxBR

Row index of the element that should become the bottom-right element of the submatrix

RowIdxTL

Row index of the element that should become the top-left element of the submatrix

T

Element type of the Matrix

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Submatrix

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Submatrix.type
trait Transpose[R <: Int, C <: Int, T]

Type class for transposing a Matrix.

Type class for transposing a Matrix.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait TupleSupport

Auxiliary traits and givens supporting tuple-based construction of Matrices via MatrixFactory.fromTuple.

Auxiliary traits and givens supporting tuple-based construction of Matrices via MatrixFactory.fromTuple.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object TupleSupport
object TupleSupport extends TupleSupport

Attributes

Companion
trait
Supertypes
trait TupleSupport
class Object
trait Matchable
class Any
Self type