Matrix

vecxt.matrix.Matrix
See theMatrix companion object
class Matrix[A]

This is a matrix. The constructor is private to ensure that you deliberately opt in or out of the bounds check.

Type parameters

A

The type of elements in the matrix, specialized for Double, Boolean

Value parameters

colStride

The stride for columns, used for efficient access.

cols

The number of columns in the matrix.

offset

The offset in the raw array where the matrix data starts.

raw

The underlying array that holds the matrix data.

rowStride

The stride for rows, used for efficient access.

rows

The number of rows in the matrix.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

inline def shape: RowCol
Extension method from matrix

Concrete fields

val colStride: Int
val cols: Col

If the matrix is dense and contiguous, it means that the data is stored in a single block of memory in row or column major, or row major order, with the exact number of elements matching the number of rows and columns.

If the matrix is dense and contiguous, it means that the data is stored in a single block of memory in row or column major, or row major order, with the exact number of elements matching the number of rows and columns.

We can take advantage of this for performance.

Attributes

lazy val isDenseColMajor: Boolean

If the matrix is dense and contiguous in row major order, it means that the data is stored in a single block of memory in row major order. Useful for performance optimizations.

If the matrix is dense and contiguous in row major order, it means that the data is stored in a single block of memory in row major order. Useful for performance optimizations.

Attributes

lazy val isDenseRowMajor: Boolean
lazy val numel: Int
val offset: Int
val raw: Array[A]
val rowStride: Int
val rows: Row