![]() |
Bachelor's degree final project
v1.0
Faculty of Mathematics, University of Barcelona
|
Implements functions that save a vector or a matrix in some file. More...
#include "save.h"
Defines | |
#define | EPS 1e-10 |
Functions | |
int | save_vector (size_t idx, size_t n, double *const b, FILE *const f) |
Function that saves the values of a vector in a given file. | |
int | saveas_vector (size_t idx, size_t n, double *const b, char *const name) |
Function that saves the values of a vector in a given filename. | |
int | save_vector_indexs (size_t idx, size_t n, double *const b, FILE *const f) |
Function that saves the values not zero of a vector with its indexs in a given file. | |
int | saveas_vector_indexs (size_t idx, size_t n, double *const b, char *const name) |
Function that saves the values not zero of a vector with its indexs in a given filename. | |
int | save_matrix (size_t idx_row, size_t m, size_t idx_col, size_t n, double **const A, FILE *const f) |
Function that saves the values of a matrix in a given file. | |
int | saveas_matrix (size_t idx_row, size_t m, size_t idx_col, size_t n, double **const A, char *const name) |
Function that saves the values of a matrix in a given filename. | |
int | save_matrix_indexs (size_t idx_row, size_t m, size_t idx_col, size_t n, double **const A, FILE *const f) |
Function that saves the values not zero of a matrix with its indexs in a given file. | |
int | saveas_matrix_indexs (size_t idx_row, size_t m, size_t idx_col, size_t n, double **const A, char *const name) |
Function that saves the values not zero of a matrix with its indexs in a given filename. |
Implements functions that save a vector or a matrix in some file.
#define EPS 1e-10 |
int save_matrix | ( | size_t | idx_row, |
size_t | m, | ||
size_t | idx_col, | ||
size_t | n, | ||
double **const | A, | ||
FILE *const | f | ||
) |
Function that saves the values of a matrix in a given file.
[in] | idx_row | Start index row |
[in] | m | Rows |
[in] | idx_col | Start index column |
[in] | n | Columns |
[in] | A | Pointer to a matrix |
[in] | f | Output file |
0 | If some error has occurred in some moment of the process |
1 | Otherwise |
References pic::n.
int save_matrix_indexs | ( | size_t | idx_row, |
size_t | m, | ||
size_t | idx_col, | ||
size_t | n, | ||
double **const | A, | ||
FILE *const | f | ||
) |
Function that saves the values not zero of a matrix with its indexs in a given file.
[in] | idx_row | Start index row |
[in] | m | Rows |
[in] | idx_col | Start index column |
[in] | n | Columns |
[in] | A | Pointer to a matrix |
[in] | f | Output file |
0 | If some error has occurred in some moment of the process |
1 | Otherwise |
int save_vector | ( | size_t | idx, |
size_t | n, | ||
double *const | b, | ||
FILE *const | f | ||
) |
Function that saves the values of a vector in a given file.
[in] | idx | Start index |
[in] | n | Dimension |
[in] | b | Pointer to a vector |
[in] | f | Output file |
0 | If some error has occurred in some moment of the process |
1 | Otherwise |
References pic::n.
int save_vector_indexs | ( | size_t | idx, |
size_t | n, | ||
double *const | b, | ||
FILE *const | f | ||
) |
Function that saves the values not zero of a vector with its indexs in a given file.
[in] | idx | Start index |
[in] | n | Dimension |
[in] | b | Pointer to a vector |
[in] | f | Output file |
0 | If some error has occurred in some moment of the process |
1 | Otherwise |
int saveas_matrix | ( | size_t | idx_row, |
size_t | m, | ||
size_t | idx_col, | ||
size_t | n, | ||
double **const | A, | ||
char *const | name | ||
) |
Function that saves the values of a matrix in a given filename.
[in] | idx_row | Start index row |
[in] | m | Rows |
[in] | idx_col | Start index column |
[in] | n | Columns |
[in] | A | Pointer to a matrix |
[in] | name | Filename |
0 | If some error has occurred in some moment of the process |
1 | Otherwise |
References pic::f, and save_matrix().
int saveas_matrix_indexs | ( | size_t | idx_row, |
size_t | m, | ||
size_t | idx_col, | ||
size_t | n, | ||
double **const | A, | ||
char *const | name | ||
) |
Function that saves the values not zero of a matrix with its indexs in a given filename.
[in] | idx_row | Start index row |
[in] | m | Rows |
[in] | idx_col | Start index column |
[in] | n | Columns |
[in] | A | Pointer to a matrix |
[in] | name | Filename |
0 | If some error has occurred in some moment of the process |
1 | Otherwise |
References pic::f, and save_matrix_indexs().
int saveas_vector | ( | size_t | idx, |
size_t | n, | ||
double *const | b, | ||
char *const | name | ||
) |
Function that saves the values of a vector in a given filename.
[in] | idx | Start index |
[in] | n | Dimension |
[in] | b | Pointer to a vector |
[in] | name | Filename |
0 | If some error has occurred in some moment of the process |
1 | Otherwise |
References pic::f, and save_vector().
int saveas_vector_indexs | ( | size_t | idx, |
size_t | n, | ||
double *const | b, | ||
char *const | name | ||
) |
Function that saves the values not zero of a vector with its indexs in a given filename.
[in] | idx | Start index |
[in] | n | Dimension |
[in] | b | Pointer to a vector |
[in] | name | Filename |
0 | If some error has occurred in some moment of the process |
1 | Otherwise |
References pic::f, and save_vector_indexs().