Matrix2

com.phasmid.majabigwaduce.matrix.Matrix2
See theMatrix2 companion object
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.

Type parameters

T

the underlying type of this matrix

Value parameters

rows

the rows

Attributes

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

Members list

Value members

Concrete methods

def product2[Y, Z](other: Matrix2[Y])(implicit evidence$1: Numeric[Y], evidence$2: Product[Z], evidence$3: Monoid[Z], evidence$4: Numeric[Z], ev: Monoid[Seq[T]], atMost: Duration, cutoff: Dimensions, context: DDContext): Matrix[Seq[Z]]

Method to multiply this Matrix2 with another Matrix2.

Method to multiply this Matrix2 with another Matrix2.

Type parameters

Y

the underlying type of the other Matrix2.

Z

the underlying type of the resulting Matrix.

Value parameters

atMost

max duration.

context

the DDContext in which any DataDefinition is evaluated (by default, DDContext.default).

cutoff

the cutoff (see Dimensions).

ev

evidence that Seq[T] is a monoid.

other

the other Matrix2.

Attributes

Returns

the product of this and other as a Matrix

override def size: Dimensions

The number of rows. This method may be overridden

The number of rows. This method may be overridden

Attributes

Returns

a sequence of one integer.

Definition Classes
def transpose: Seq[Seq[T]]

Inherited methods

protected def forRows[Z](g: Seq[T] => Z)(implicit evidence$1: Monoid[Z], ev: Monoid[Seq[T]], atMost: Duration, cutoff: Dimensions, context: DDContext): Seq[Z]

Method to process the rows of this Matrix. If the size is less than the cutoff, then we do the operation in the current thread; otherwise we do it using MapReduce.

Method to process the rows of this Matrix. If the size is less than the cutoff, then we do the operation in the current thread; otherwise we do it using MapReduce.

Type parameters

Z

the underlying type of the result

Value parameters

atMost

duration of total MapReduce time

context

the DDContext in which any DataDefinition is evaluated (by default, DDContext.default)

cutoff

the maximum size we should implement in current thread

ev

evidence of Monoid[X]

g

a function which takes an X and yields a Z

Attributes

Returns

a Matrix which is the product of this and m

Inherited from:
BaseMatrix
def product[Y, Z](ys: Seq[Y])(implicit evidence$1: Numeric[Y], evidence$2: Product[Z], evidence$3: Monoid[Z], evidence$4: Numeric[Z], ev: Monoid[Seq[T]], atMost: Duration, cutoff: Dimensions, context: DDContext): Matrix[Z]

Determine the product of this Matrix with a sequence of Y objects

Determine the product of this Matrix with a sequence of Y objects

Type parameters

Y

the type of the multiplicand rows

Z

the underlying type of the result

Value parameters

atMost

duration of total MapReduce time

context

the DDContext in which any DataDefinition is evaluated (by default, DDContext.default)

cutoff

the maximum size we should implement in current thread

ev

evidence of Monoid[X]

ys

the rows of Y to be multiplied with this Matrix

Attributes

Returns

a Matrix which is the product of this and m

Inherited from:
Matrix
def product[Y, Z](m: Matrix[Y])(implicit evidence$1: Numeric[Y], evidence$2: Product[Z], evidence$3: Monoid[Z], evidence$4: Numeric[Z], ev: Monoid[Seq[T]], atMost: Duration, cutoff: Dimensions, context: DDContext): Matrix[Z]

Determine the product of this Matrix with m

Determine the product of this Matrix with m

Type parameters

Y

the underlying type of m

Z

the underlying type of the result

Value parameters

atMost

duration of total MapReduce time

context

the DDContext in which any DataDefinition is evaluated (by default, DDContext.default)

cutoff

the maximum size we should implement in current thread

ev

evidence of Monoid[X]

m

the multiplicand

Attributes

Returns

a Matrix which is the product of this and m

Inherited from:
Matrix
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product