MatrixConstructors

trait MatrixConstructors[Mat <: (Matrix)]
class Object
trait Matchable
class Any
object CSCMatrix.type
object DenseMatrix.type
object Matrix.type

Value members

Abstract methods

def create[@specialized(Double, Int, Float, Long) V : Zero](rows: Int, cols: Int, data: Array[V]): Mat[V]
def zeros[@specialized(Double, Int, Float, Long) V : Zero](rows: Int, cols: Int): Mat[V]

Concrete methods

def apply[R, @specialized(Double, Int, Float, Long) V](rows: R*)(implicit rl: LiteralRow[R, V], man: ClassTag[V], zero: Zero[V]): Mat[V]

Static constructor for a literal matrix.

Static constructor for a literal matrix.

def fill[@specialized(Double, Int, Float, Long) V : Zero](rows: Int, cols: Int)(v: => V): Mat[V]
def ones[@specialized(Double, Int, Float, Long) V : Semiring](rows: Int, cols: Int): Mat[V]

Creates a matrix of all ones.

Creates a matrix of all ones.

def rand[T : Zero](rows: Int, cols: Int, rand: Rand[T]): Mat[T]
def tabulate[@specialized(Double, Int, Float, Long) V : Zero](rows: Int, cols: Int)(f: (Int, Int) => V): Mat[V]

Implicits

Implicits

implicit def canCreateZeros[T : Zero]: CanCreateZeros[Mat[T], (Int, Int)]