Bachelor's degree final project  v1.0
Faculty of Mathematics, University of Barcelona
Defines | Functions
src/save.c File Reference

Implements functions that save a vector or a matrix in some file. More...

#include "save.h"
+ Include dependency graph for save.c:

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.

Detailed Description

Implements functions that save a vector or a matrix in some file.

Author:
Joan Gimeno
Date:
22/05/2014 (start)
Version:
1.0

Define Documentation

#define EPS   1e-10

Function Documentation

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.

Parameters:
[in]idx_rowStart index row
[in]mRows
[in]idx_colStart index column
[in]nColumns
[in]APointer to a matrix
[in]fOutput file
Return values:
0If some error has occurred in some moment of the process
1Otherwise
Precondition:
The pointers are not NULL
Postcondition:
The file with name has been created or modified with the result

References pic::n.

+ Here is the caller graph for this function:

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.

Parameters:
[in]idx_rowStart index row
[in]mRows
[in]idx_colStart index column
[in]nColumns
[in]APointer to a matrix
[in]fOutput file
Return values:
0If some error has occurred in some moment of the process
1Otherwise
Precondition:
The pointers are not NULL
Postcondition:
The file with name has been created or modified with the result

References EPS, and pic::n.

+ Here is the caller graph for this function:

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.

Parameters:
[in]idxStart index
[in]nDimension
[in]bPointer to a vector
[in]fOutput file
Return values:
0If some error has occurred in some moment of the process
1Otherwise
Precondition:
The pointers are not NULL
Postcondition:
The file with name has been created or modified with the result

References pic::n.

+ Here is the caller graph for this function:

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.

Parameters:
[in]idxStart index
[in]nDimension
[in]bPointer to a vector
[in]fOutput file
Return values:
0If some error has occurred in some moment of the process
1Otherwise
Precondition:
The pointers are not NULL
Postcondition:
The file with name has been created or modified with the result

References EPS, and pic::n.

+ Here is the caller graph for this function:

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.

Parameters:
[in]idx_rowStart index row
[in]mRows
[in]idx_colStart index column
[in]nColumns
[in]APointer to a matrix
[in]nameFilename
Return values:
0If some error has occurred in some moment of the process
1Otherwise
Precondition:
The pointers are not NULL
Postcondition:
The file with name has been created or modified with the result

References pic::f, and save_matrix().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

Parameters:
[in]idx_rowStart index row
[in]mRows
[in]idx_colStart index column
[in]nColumns
[in]APointer to a matrix
[in]nameFilename
Return values:
0If some error has occurred in some moment of the process
1Otherwise
Precondition:
The pointers are not NULL
Postcondition:
The file with name has been created or modified with the result

References pic::f, and save_matrix_indexs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

Parameters:
[in]idxStart index
[in]nDimension
[in]bPointer to a vector
[in]nameFilename
Return values:
0If some error has occurred in some moment of the process
1Otherwise
Precondition:
The pointers are not NULL
Postcondition:
The file with name has been created or modified with the result

References pic::f, and save_vector().

+ Here is the call graph for this function:

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.

Parameters:
[in]idxStart index
[in]nDimension
[in]bPointer to a vector
[in]nameFilename
Return values:
0If some error has occurred in some moment of the process
1Otherwise
Precondition:
The pointers are not NULL
Postcondition:
The file with name has been created or modified with the result

References pic::f, and save_vector_indexs().

+ Here is the call graph for this function: