com.phasmid.majabigwaduce.matrix

Members list

Type members

Classlikes

abstract class BaseMatrix[X] extends Matrix[X]

Abstract class to implement some common methods of Matrix

Abstract class to implement some common methods of Matrix

Type parameters

X

the underlying type of each row of the matrix (may itself be a sequence).

Attributes

Supertypes
trait Matrix[X]
class Object
trait Matchable
class Any
Known subtypes
class Matrix1[T]
class Matrix2[T]
object Dimensions

Companion object for the Dimensions class, providing utility methods and predefined instances for working with matrix dimensions.

Companion object for the Dimensions class, providing utility methods and predefined instances for working with matrix dimensions.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Dimensions.type
case class Dimensions(xs: Seq[Int]) extends Ordered[Dimensions]

Case class to represent the dimensions of a matrix. Currently, area works only for one- or two-dimensional matrices

Case class to represent the dimensions of a matrix. Currently, area works only for one- or two-dimensional matrices

Value parameters

xs

a sequence of integers defining the numbers of rows, columns, etc.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Ordered[Dimensions]
trait Comparable[Dimensions]
class Object
trait Matchable
class Any
Show all
case class IncompatibleDimensionsException(cols: Int, rows: Int) extends MatrixException

Exception thrown to indicate that two matrices have incompatible dimensions for the operation being performed.

Exception thrown to indicate that two matrices have incompatible dimensions for the operation being performed.

This exception generally occurs when the number of columns in the left-hand side (LHS) matrix does not match the number of rows in the right-hand side (RHS) matrix, a requirement for operations like matrix multiplication.

Value parameters

cols

The number of columns in the LHS matrix.

rows

The number of rows in the RHS matrix.

Attributes

Throws
IncompatibleDimensionsException

when matrix dimensions are not suitable for the intended operation.

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class IncompatibleLengthsException(l1: Int, l2: Int) extends MatrixException

Exception that indicates a mismatch between two lengths during matrix operations.

Exception that indicates a mismatch between two lengths during matrix operations.

This exception is typically thrown when two sequences or matrices, each with a specific length, are expected to align but do not. For example, when performing element-wise operations on two vectors, their lengths must match; otherwise, this exception is raised.

Value parameters

l1

The first length involved in the operation.

l2

The second length involved in the operation.

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
trait Matrix[X]

The Matrix[X] trait represents a sequence of X.

The Matrix[X] trait represents a sequence of X.

Type parameters

X

the underlying type of each row of the matrix (may itself be a sequence).

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class BaseMatrix[X]
class Matrix1[T]
class Matrix2[T]
object Matrix

Object Matrix serves as a utility and companion object for operations related to matrices. It provides various matrix-specific methods such as Kronecker Delta and utility definitions including logging.

Object Matrix serves as a utility and companion object for operations related to matrices. It provides various matrix-specific methods such as Kronecker Delta and utility definitions including logging.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Matrix.type
case class Matrix1[T](rows: Seq[T])(implicit evidence$1: Numeric[T], atMost: Duration) extends BaseMatrix[T]

Case class to represent a one-dimensional matrix.

Case class to represent a one-dimensional matrix.

Type parameters

T

the underlying type of this matrix

Value parameters

atMost

duration of total MapReduce time

rows

the elements of type T

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class BaseMatrix[T]
trait Matrix[T]
class Object
trait Matchable
class Any
Show all
object Matrix1

Object Matrix1 provides an implicit duration parameter atMost. The atMost parameter defines a finite timeout duration of 1 second.

Object Matrix1 provides an implicit duration parameter atMost. The atMost parameter defines a finite timeout duration of 1 second.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Matrix1.type
object Matrix2

Companion object for the Matrix2 class, offering utility methods and definitions related to matrix creation and operations, as well as given values for configuration purposes.

Companion object for the Matrix2 class, offering utility methods and definitions related to matrix creation and operations, as well as given values for configuration purposes.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Matrix2.type
case class Matrix2[T](rows: Seq[Seq[T]])(using evidence$1: Numeric[T]) extends BaseMatrix[Seq[T]]

Case class to represent a two-dimensional matrix.

Case class to represent a two-dimensional matrix.

Type parameters

T

the underlying type of this matrix

Value parameters

rows

the rows

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class BaseMatrix[Seq[T]]
trait Matrix[Seq[T]]
class Object
trait Matchable
class Any
Show all
abstract class MatrixException(str: String) extends Exception

Base class for exceptions that can occur during matrix operations.

Base class for exceptions that can occur during matrix operations.

This exception serves as a parent class for more specific exceptions related to matrix computations, such as dimension or length mismatches.

Value parameters

str

The detailed error message providing contextual information about the nature of the exception.

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Product[Z]

Type-class trait which knows how to multiply an X and a Y to yield a Z

Type-class trait which knows how to multiply an X and a Y to yield a Z

Type parameters

Z

the result type

Attributes

Supertypes
class Object
trait Matchable
class Any