LADEL main
Sparse LDL factorization package with rank 1 and rowadd/rowdel updates
ladel_matmat.h
Go to the documentation of this file.
1/**
2 * @file ladel_matmat.h
3 * @author Ben Hermans
4 * @brief Routines to compute matrix matrix products. For now only @f$MM^T@f$ and @f$M\Sigma M^T@f$,
5 * with @f$\Sigma@f$ a diagonal matrix, are supported.
6 */
7
8#ifndef LADEL_MATMAT_H
9#define LADEL_MATMAT_H
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include "ladel_types.h"
16
17/**
18 * Computes @f$MM^T@f$.
19 *
20 * @param M Matrix
21 * @param M_transpose The transpose of @a M
22 * @param work LADEL workspace
23 * @return @f$MM^T@f$
24 */
26 const ladel_sparse_matrix *M_transpose,
27 ladel_work *work);
28
29/**
30 * Computes the pattern of @f$MM^T@f$.
31 *
32 * @param M Matrix
33 * @param M_transpose The transpose of @a M
34 * @param work LADEL workspace
35 * @return The patter of @f$MM^T@f$
36 */
38 const ladel_sparse_matrix *M_transpose,
39 ladel_work *work);
40
41/**
42 * Computes @f$M\Sigma M^T@f$.
43 *
44 * @param M Matrix
45 * @param M_transpose The transpose of @a M
46 * @param diag Array containing the diagonal of @f$\Sigma@f$
47 * @param work LADEL workspace
48 */
50 const ladel_sparse_matrix *M_transpose,
51 const ladel_double *diag,
52 ladel_work *work);
53
54/**
55 * Core mat_mat_transpose function with all options (diag and value/pattern).
56 *
57 * @note If @a values==FALSE, only the pattern of @f$MM^T@f$. Setting @a diag=NULL, then @f$\Sigma = I@f$
58 * is assumed.
59 *
60 * @param M Matrix
61 * @param M_transpose Transpose of M
62 * @param diag Array containing the diagonal of @f$\Sigma@f$. If NULL, @f$\Sigma = I@f$.
63 * @param values Values or pattern computation
64 * @param work LADEL workspace
65 */
67 const ladel_sparse_matrix *M_transpose,
68 const ladel_double *diag,
69 ladel_int values,
70 ladel_work *work);
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif /* LADEL_MATMAT_H */
ladel_sparse_matrix * ladel_mat_diag_mat_transpose(const ladel_sparse_matrix *M, const ladel_sparse_matrix *M_transpose, const ladel_double *diag, ladel_work *work)
Computes .
Definition: ladel_matmat.c:17
ladel_sparse_matrix * ladel_mat_mat_transpose_pattern(const ladel_sparse_matrix *M, const ladel_sparse_matrix *M_transpose, ladel_work *work)
Computes the pattern of .
Definition: ladel_matmat.c:12
ladel_sparse_matrix * ladel_mat_mat_transpose(const ladel_sparse_matrix *M, const ladel_sparse_matrix *M_transpose, ladel_work *work)
Computes .
Definition: ladel_matmat.c:7
ladel_sparse_matrix * ladel_mat_mat_transpose_advanced(const ladel_sparse_matrix *M, const ladel_sparse_matrix *M_transpose, const ladel_double *diag, ladel_int values, ladel_work *work)
Core mat_mat_transpose function with all options (diag and value/pattern).
Definition: ladel_matmat.c:22
Structures and types used in LADEL routines.
int64_t ladel_int
Type for integer numbers (default: int64_t)
Definition: ladel_types.h:24
double ladel_double
Type for floating point numbers (default: double)
Definition: ladel_types.h:20
Sparse matrix in compressed column storage.
Definition: ladel_types.h:35
Workspace required for various routines in LADEL.
Definition: ladel_types.h:109