Companion

object Companion

Functions

Link copied to clipboard
fun column(vararg data: Double): Matrix

Creates an n by 1 matrix with data as its elements, where n is data.size.

Link copied to clipboard
fun diagonal(vararg data: Double): Matrix

Creates a matrix with data along the diagonal and all other elements set to 0.

Link copied to clipboard

Creates an identity matrix with dimensions size by size.

Link copied to clipboard
fun row(vararg data: Double): Matrix

Creates a 1 by n matrix with data as its elements, where n is data.size.

Link copied to clipboard
fun zero(size: Int): Matrix

Creates a zero matrix with dimensions size by size.

fun zero(rows: Int, cols: Int): Matrix

Creates a zero matrix with the given dimensions.