BaseMatrix

com.phasmid.majabigwaduce.matrix.BaseMatrix
abstract class BaseMatrix[X] extends Matrix[X]

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

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

Members list

Value members

Concrete methods

protected def forRows[Z](g: X => Z)(implicit evidence$1: Monoid[Z], ev: Monoid[X], 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

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.

Inherited methods

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[X], 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[X], 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

Inherited and Abstract methods

def rows: Seq[X]

The rows of this Matrix

The rows of this Matrix

Attributes

Inherited from:
Matrix