_MatrixValue

it.grypho.scala.leonardo.core._MatrixValue
See the_MatrixValue companion class
object _MatrixValue

Companion for the dense concrete matrix value _MatrixValue.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(rows: Int, cols: Int, data: Array[Double]): _MatrixValue

Creates a _MatrixValue from a caller-supplied row-major array (defensively copied).

Creates a _MatrixValue from a caller-supplied row-major array (defensively copied).

Value parameters

cols

number of columns; must be positive

data

row-major element array; must have length rows * cols

rows

number of rows; must be positive

Attributes

def identity(n: Int): _MatrixValue

n×n identity matrix — dense counterpart of the matrix.IdentityMatrix node. Used by the vectorized (Sylvester) solver tier for absent left/right coefficients.

n×n identity matrix — dense counterpart of the matrix.IdentityMatrix node. Used by the vectorized (Sylvester) solver tier for absent left/right coefficients.

Value parameters

n

side length; must be positive

Attributes

def unvec(v: _MatrixValue, rows: Int, cols: Int): Option[_MatrixValue]

Inverse of vec: reshapes a (rows·cols)×1 column vector back into a rows×cols matrix using column-major order (matching vec's stacking). None when v does not conform to the requested dimensions.

Inverse of vec: reshapes a (rows·cols)×1 column vector back into a rows×cols matrix using column-major order (matching vec's stacking). None when v does not conform to the requested dimensions.

Value parameters

cols

target number of columns

rows

target number of rows

v

the vectorised matrix; must be a column vector of length rows * cols

Attributes