Mat

org.saddle.Mat$
See theMat companion class
object Mat

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Mat.type

Members list

Concise view

Value members

Concrete methods

def apply[T](rows: Int, cols: Int, arr: Array[T])(implicit st: ScalarTag[T]): Mat[T]

Factory method to create a new Mat from raw materials

Factory method to create a new Mat from raw materials

Attributes

T

Type of data in array

arr

A 1D array of backing data in row-major order

cols

Number of cols in Mat

rows

Number of rows in Mat

def apply[T](rows: Int, cols: Int, vec: Vec[T])(implicit st: ScalarTag[T]): Mat[T]
def apply[T](numRows: Int, numCols: Int)(implicit st: ScalarTag[T]): Mat[T]

Factory method to create an zero Mat (all zeros)

Factory method to create an zero Mat (all zeros)

Attributes

T

Type of elements in Mat

numCols

Number of cols in Mat

numRows

Number of rows in Mat

def apply[T : ScalarTag](values: Array[Array[T]]): Mat[T]

Factory method to create a Mat from an array of arrays. Each inner array will become a column of the new Mat instance.

Factory method to create a Mat from an array of arrays. Each inner array will become a column of the new Mat instance.

Attributes

T

Type of elements in inner array

values

Array of arrays, each of which is to be a column

def apply[T : ScalarTag](values: Array[Vec[T]]): Mat[T]

Factory method to create a Mat from an array of Vec. Each inner Vec will become a column of the new Mat instance.

Factory method to create a Mat from an array of Vec. Each inner Vec will become a column of the new Mat instance.

Attributes

T

Type of elements in Vec

values

Array of Vec, each of which is to be a column

def apply[T : ScalarTag](values: Vec[T]*): Mat[T]

Factory method to create a Mat from a sequence of Vec. Each inner Vec will become a column of the new Mat instance.

Factory method to create a Mat from a sequence of Vec. Each inner Vec will become a column of the new Mat instance.

Attributes

T

Type of elements in array

values

Sequence of Vec, each of which is to be a column

def empty[T : ScalarTag]: Mat[T]

Factory method to create an empty Mat

Factory method to create an empty Mat

Attributes

T

Type of Mat

def fromRows[T : ScalarTag](rows: Vec[T]*): Mat[T]

Factory method to create a Mat from a sequence of Vec. Each inner Vec will become a row of the new Mat instance.

Factory method to create a Mat from a sequence of Vec. Each inner Vec will become a row of the new Mat instance.

Attributes

T

Type of elements in array

values

Sequence of Vec, each of which is to be a row

def ident(n: Int): Mat[Double]

Factory method to create an identity matrix; ie with ones along the diagonal and zeros off-diagonal.

Factory method to create an identity matrix; ie with ones along the diagonal and zeros off-diagonal.

Attributes

n

The width of the square matrix