Documentation ¶
Index ¶
- func LoadMatrix(savepath string) (*mat.Dense, error)
- func LoadVector(savepath string) (*mat.VecDense, error)
- func LoadVectorCollection(savepath string) ([]*mat.VecDense, error)
- func SaveMatrix(matrix *mat.Dense, savepath string) error
- func SaveVector(vec *mat.VecDense, savepath string) error
- func SaveVectorCollection(vecCollection []*mat.VecDense, savepath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadMatrix ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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.