LADEL main
Sparse LDL factorization package with rank 1 and rowadd/rowdel updates
ladel_rank1_mod.h
Go to the documentation of this file.
1/**
2 * @file ladel_rank1_mod.h
3 * @author Ben Hermans
4 * @brief Helper routines for the rank1_update function.
5 * @details The ladel_rank1_update function implements rank 1 updates for a sparse factorization, and is implemented
6 * in ladel_rank1_mod.c.
7 */
8
9#ifndef LADEL_RANK1_MOD_H
10#define LADEL_RANK1_MOD_H
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include "ladel_types.h"
17
18/**
19 * Adds the nonzero pattern in @a set to the pattern of the @a col of @a L.
20 *
21 * @param L Sparse factor
22 * @param col Column index
23 * @param col_set Pointer to set struct that can hold the pattern of a column of L
24 * @param set Nonzero pattern to be added
25 * @param difference Output elements in set that did not occur in the column of L
26 * @param offset Output list of offset indices of original elements of the column of L
27 * @param insertions Output list of indices where new elements have been added to the column of L
28 * @return Resulting status (@a SET_HAS_CHANGED, @a SET_HAS_NOT_CHANGED, or @a MAX_SET_SIZE_EXCEEDED)
29 */
31 ladel_int col,
32 ladel_set *col_set,
33 ladel_set *set,
34 ladel_set *difference,
35 ladel_int *offset,
36 ladel_int *insertions);
37
38/**
39 * Computes the set union of two index sets.
40 *
41 * The result is stored in @a first_set. This function also returns some information
42 * on the set union, that is:
43 * - The elements in the @a second_set which were not already in the @a first_set are stored in @a difference
44 * - The difference of the indices of the original elements of @a first_set versus now is stored in @a offset
45 * - The indices of the set union @a first_set where new elements have been added from @a second_set are stored in @a insertions
46 * @param first_set First input set, on output the set union
47 * @param second_set Second input set
48 * @param difference Output elements in @a second_set that were not originally in @a first_set
49 * @param offset Output list of offset indices of original elements of the @a first_set
50 * @param insertions Output list of indices where new elements have been added to @a first_set from @a second_set
51 * @param threshold Only elements from the @a second_set with value > this threshold are considered
52 * @return Resulting status (@a SET_HAS_CHANGED, @a SET_HAS_NOT_CHANGED, or @a MAX_SET_SIZE_EXCEEDED)
53 */
55 ladel_set *second_set,
56 ladel_set *difference,
57 ladel_int *offset,
58 ladel_int *insertions,
59 ladel_int threshold);
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif
ladel_int ladel_add_nonzero_pattern_to_col_of_L(ladel_sparse_matrix *L, ladel_int col, ladel_set *col_set, ladel_set *set, ladel_set *difference, ladel_int *offset, ladel_int *insertions)
Adds the nonzero pattern in set to the pattern of the col of L.
ladel_int ladel_set_union(ladel_set *first_set, ladel_set *second_set, ladel_set *difference, ladel_int *offset, ladel_int *insertions, ladel_int threshold)
Computes the set union of two index sets.
Structures and types used in LADEL routines.
int64_t ladel_int
Type for integer numbers (default: int64_t)
Definition: ladel_types.h:24
Sparse matrix in compressed column storage.
Definition: ladel_types.h:35
Set of integers.
Definition: ladel_types.h:81