gonumio

package
v0.0.0-...-bdcb5bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadMatrix

func LoadMatrix(savepath string) (*mat.Dense, error)

Loads a matrix from a saved file

Arguments

savepath string, Pathlike: The path to the file the matrix is saved in

Returns

(loaded matrix, nil) on success, (nil, error) on errors

func LoadVector

func LoadVector(savepath string) (*mat.VecDense, error)

Loads a vector from a saved file

Arguments

savepath string, Pathlike: The path to the file the vector is saved in

Returns

(loaded vector, nil) on success, (nil, error) on errors

func LoadVectorCollection

func LoadVectorCollection(savepath string) ([]*mat.VecDense, error)

Loads a vectorCollection from a saved file

Arguments

savepath: The path to the file the vectorCollection is saved in

Returns

(loaded []*mat.VecDense, nil) on success, (nil, error) on errors

func SaveMatrix

func SaveMatrix(matrix *mat.Dense, savepath string) error

Save a matrix to the given file.

If the file does not exist, attempts to create it. Warning: this method will overwrite the file it is pointed at!

Arguments

matrix *mat.Dense: The matrix to save

savepath string, Pathlike: The path to the file to save into

Returns

Error if something went wrong, nil if saved correctly

func SaveVector

func SaveVector(vec *mat.VecDense, savepath string) error

Save a vector to the given file.

If the file does not exist, attempts to create it. Warning: this method will overwrite the file it is pointed at!

Arguments

vector *mat.VecDense: The vector to save

savepath string, Pathlike: The path to the file to save into

Returns

Error if something went wrong, nil if saved correctly

func SaveVectorCollection

func SaveVectorCollection(vecCollection []*mat.VecDense, savepath string) error

Save a vector collection to the given file.

If the file does not exist, attempts to create it. Warning: this method will overwrite the file it is pointed at!

This method first organizes all the given vectors as rows of a matrix before saving the matrix. Be aware this requires all vectors in the collection to have the same length!

Arguments

vecCollection: The vector collection to save

savepath: The path to the file to save into

Returns

Error if something went wrong, nil if saved correctly

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL