![]() |
Bachelor's degree final project
v1.0
Faculty of Mathematics, University of Barcelona
|
Set of different function for linear systems. More...
#include "utils.h"
Include dependency graph for utils.c:Functions | |
| double | euclidian_norm (size_t n, double *const x) |
Derive the euclidian norm of a vector, that is, . | |
| double | inner_product (size_t n, double *const x) |
Derive the ordinary inner product of a vector, that is, . | |
| void | copy_vector (size_t n, double *const x, double *const y) |
| Copy the vector x in y. | |
| void | copy_matrix (size_t m, size_t n, double **const A, double **const B) |
| Copy the matrix A in B. | |
| void | print_matrix (size_t m, size_t n, double **const A, char *const name) |
| Display in stdout a matrix m-by-n. | |
| void | print_vector (size_t idx, size_t n, double *const v, char *const name) |
| Display in stdout a n-dimensional vector starting by an index. | |
| double * | malloc_vector (size_t n) |
| Malloc a n-dimensional vector. | |
| void | free_vector (double *p) |
| Free a vector. | |
| double ** | malloc_matrix (size_t m, size_t n) |
| Malloc a m-by-n matrix. | |
| void | free_matrix (size_t m, double **p) |
| Free a matrix with m rows. | |
| void | allocated_vector (void *p, size_t n) |
| void | free_vector2 (void *p, size_t n) |
| void | allocated_matrix (void **p, size_t m, size_t n) |
| void | free_matrix2 (void **p, size_t m, size_t n) |
Set of different function for linear systems.
| void allocated_matrix | ( | void ** | p, |
| size_t | m, | ||
| size_t | n | ||
| ) |
| void allocated_vector | ( | void * | p, |
| size_t | n | ||
| ) |
| void copy_matrix | ( | size_t | m, |
| size_t | n, | ||
| double **const | A, | ||
| double **const | B | ||
| ) |
Copy the matrix A in B.
| [in] | m | Rows |
| [in] | m | Columns |
| [in] | A | Source matrix |
| [out] | B | Destination matrix |
References pic::n.
Here is the caller graph for this function:| void copy_vector | ( | size_t | n, |
| double *const | x, | ||
| double *const | y | ||
| ) |
Copy the vector x in y.
| [in] | n | Dimension |
| [in] | x | Source vector |
| [out] | y | Destination vector |
References pic::n.
| double euclidian_norm | ( | size_t | n, |
| double *const | x | ||
| ) |
Derive the euclidian norm of a vector, that is,
.
| [in] | n | Dimension of vector |
| [in] | x | Input vector |
References pic::n.
Here is the caller graph for this function:| void free_matrix | ( | size_t | m, |
| double ** | p | ||
| ) |
Free a matrix with m rows.
| [in] | m | Rows |
Here is the caller graph for this function:| void free_matrix2 | ( | void ** | p, |
| size_t | m, | ||
| size_t | n | ||
| ) |
| void free_vector | ( | double * | p | ) |
Free a vector.
| [in] | p | Pointer |
Here is the caller graph for this function:| void free_vector2 | ( | void * | p, |
| size_t | n | ||
| ) |
Here is the caller graph for this function:| double inner_product | ( | size_t | n, |
| double *const | x | ||
| ) |
Derive the ordinary inner product of a vector, that is,
.
| [in] | n | Dimension of vector |
| [in] | x | Input vector |
References pic::n.
Here is the caller graph for this function:| double** malloc_matrix | ( | size_t | m, |
| size_t | n | ||
| ) |
Malloc a m-by-n matrix.
| [in] | m | Rows |
| [in] | n | Columns |
Here is the caller graph for this function:| double* malloc_vector | ( | size_t | n | ) |
Malloc a n-dimensional vector.
| [in] | n | End index |
Here is the caller graph for this function:| void print_matrix | ( | size_t | m, |
| size_t | n, | ||
| double **const | A, | ||
| char *const | name | ||
| ) |
Display in stdout a matrix m-by-n.
| [in] | m | Rows |
| [in] | n | Columns |
| [in] | A | Matrix m-by-n |
| [in] | name | Name of the matrix in stdout |
References pic::n.
| void print_vector | ( | size_t | idx, |
| size_t | n, | ||
| double *const | v, | ||
| char *const | name | ||
| ) |
Display in stdout a n-dimensional vector starting by an index.
| [in] | idx | Start index |
| [in] | n | End index |
| [in] | v | Vector |
| [in] | name | Name of the vector in stdout |
References pic::n.
Here is the caller graph for this function:
1.7.6.1