Routines to add matrices.
The add_matrices and add_matrices_pattern routines compute the scaled addition of the matrices provided or of the patterns of the matrices respectively.
Definition in file ladel_add.h.
#include "ladel_types.h"
Go to the source code of this file.
Functions | |
ladel_sparse_matrix * | ladel_add_matrices (ladel_double alpha, const ladel_sparse_matrix *A, ladel_double beta, const ladel_sparse_matrix *B, ladel_work *work) |
Returns a sparse matrix \(C = \alpha A + \beta B\). More... | |
ladel_sparse_matrix * | ladel_add_matrices_pattern (const ladel_sparse_matrix *A, const ladel_sparse_matrix *B, ladel_work *work) |
Returns a pattern matrix whose pattern includes the patterns of A and B. More... | |
ladel_sparse_matrix * | ladel_add_matrices_advanced (ladel_double alpha, const ladel_sparse_matrix *A, ladel_double beta, const ladel_sparse_matrix *B, ladel_int values, ladel_work *work) |
Returns a sparse matrix \(C = \alpha A + \beta B\) if values==TRUE, or a pattern matrix that includes the patterns of A and B if values==FALSE. More... | |
ladel_sparse_matrix * ladel_add_matrices | ( | ladel_double | alpha, |
const ladel_sparse_matrix * | A, | ||
ladel_double | beta, | ||
const ladel_sparse_matrix * | B, | ||
ladel_work * | work | ||
) |
Returns a sparse matrix \(C = \alpha A + \beta B\).
alpha | Scaling for the first matrix |
A | The first matrix |
beta | Scaling for the second matrix |
B | The second matrix |
work | LADEL workspace |
Definition at line 6 of file ladel_add.c.
ladel_sparse_matrix * ladel_add_matrices_advanced | ( | ladel_double | alpha, |
const ladel_sparse_matrix * | A, | ||
ladel_double | beta, | ||
const ladel_sparse_matrix * | B, | ||
ladel_int | values, | ||
ladel_work * | work | ||
) |
Returns a sparse matrix \(C = \alpha A + \beta B\) if values==TRUE, or a pattern matrix that includes the patterns of A and B if values==FALSE.
alpha | Scaling for the first matrix |
A | The first matrix |
beta | Scaling for the second matrix |
B | The second matrix |
values | Flag to choose between values and just pattern |
work | LADEL workspace |
Definition at line 16 of file ladel_add.c.
ladel_sparse_matrix * ladel_add_matrices_pattern | ( | const ladel_sparse_matrix * | A, |
const ladel_sparse_matrix * | B, | ||
ladel_work * | work | ||
) |
Returns a pattern matrix whose pattern includes the patterns of A and B.
A | The first matrix |
B | The second matrix |
work | LADEL workspace |
Definition at line 11 of file ladel_add.c.