Documentation
¶
Overview ¶
Package matrix provides internal utilities built on top of the gonum matrix package to support common matrix operations.
This package includes functions for extracting columns, creating identity matrices, and resizing dense matrices and vectors.
It is intended for internal use within the gspl project.
Index ¶
- func ExtractColumns(A *mat.Dense, indices *mat.VecDense) *mat.Dense
- func Eye(size int) *mat.DiagDense
- func MatDenseAppendColumn(A *mat.Dense, col *mat.VecDense) *mat.Dense
- func MatDenseAppendRow(A *mat.Dense, row *mat.Dense) *mat.Dense
- func MatDenseFromArray(arr [][]float64) *mat.Dense
- func MatDenseToArray(A *mat.Dense) [][]float64
- func ResizeMatDense(m *mat.Dense, newRows, newCols int) *mat.Dense
- func ResizeVecDense(v *mat.VecDense, newLen int) *mat.VecDense
- func VecDenseAppend(v *mat.VecDense, newElem *mat.VecDense) *mat.VecDense
- func VecDenseFromArray(arr [][]float64) *mat.VecDense
- func VecToSlice(v *mat.VecDense) []float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractColumns ¶
ExtractColumns extracts columns from a *mat.Dense matrix based on the provided indices.
func MatDenseAppendColumn ¶
MatDenseAppendColumn appends a column vector to a *mat.Dense matrix.
func MatDenseFromArray ¶
MatDenseFromArray converts a 2D slice of float64 to a *mat.Dense matrix.
func MatDenseToArray ¶
MatDenseToArray converts a *mat.Dense matrix to a 2D slice of float64.
func ResizeMatDense ¶
ResizeMatDense resizes a *mat.Dense matrix to newRows x newCols, copying over the existing data as much as possible.
func ResizeVecDense ¶
ResizeVecDense resizes a *mat.VecDense vector to newLen, copying over the existing data as much as possible.
func VecDenseAppend ¶
VecDenseAppend appends a new *mat.VecDense vector to an existing one,
func VecDenseFromArray ¶
func VecToSlice ¶
Types ¶
This section is empty.