Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 5371c917259900b4efeffd61260e9ab9f80f2249 authored by Ben Hermans on 25 June 2020, 08:45:07 UTC, committed by Ben Hermans on 25 June 2020, 08:45:07 UTC
Add documentation and change some function signatures
1 parent 97025d4
  • Files
  • Changes
  • 9be602c
  • /
  • include
  • /
  • ladel.h
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:5371c917259900b4efeffd61260e9ab9f80f2249
directory badge Iframe embedding
swh:1:dir:d3c1510be47586da317303bf0d52a9da0f013bf2
content badge Iframe embedding
swh:1:cnt:32e80651a8104631b6d78b0824e4f1fe27b9398f
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
ladel.h
/**
 * @file ladel.h
 * @author Ben Hermans
 * @brief LADEL main include file.
 * @details The user can include this file in his projects to call any LADEL routine. 
 * This file contains the declaration of the factorization, backsolve and factorization
 * update routines provided by LADEL. 
 * @note The implementation of the rank1_update and row_add/del routines are respectively 
 * in ladel_rank1_mod.c and ladel_row_mod.c instead of in ladel.c.
 */

#ifndef LADEL_H
#define LADEL_H

#include "ladel_col_counts.h"
#include "ladel_constants.h"
#include "ladel_copy.h"
#include "ladel_debug_print.h"
#include "ladel_etree.h"
#include "ladel_global.h"
#include "ladel_ldl_numeric.h"
#include "ladel_ldl_symbolic.h"
#include "ladel_matvec.h"
#include "ladel_matmat.h"
#include "ladel_pattern.h"
#include "ladel_permutation.h"
#include "ladel_postorder.h"
#include "ladel_rank1_mod.h"
#include "ladel_row_mod.h"
#include "ladel_scale.h"
#include "ladel_transpose.h"
#include "ladel_types.h"
#include "ladel_upper_diag.h"
#include "ladel_add.h"
#include "ladel_submatrix.h"

/**
 * @name Main solver API
 * @{
 */

/**
 * Computes the @f$LDL^T@f$ factorization of @f$M@f$.
 * 
 * @param M                 Matrix to be factorized
 * @param sym               Symbolics of the factorization
 * @param ordering_method   Indicator to choose the ordering method: @a AMD, @a NO_ORDERING or @a GIVEN_ORDERING
 * @param LD                Output struct containing the @f$LDL^T@f$ factors
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_factorize(  ladel_sparse_matrix *M, 
                            ladel_symbolics     *sym, 
                            ladel_int           ordering_method, 
                            ladel_factor        **LD, 
                            ladel_work          *work);

/**
 * Computes the @f$LDL^T@f$ factorization of @f$M + \alpha \begin{bmatrix}I_{n} & \\ & 0\end{bmatrix}@f$.
 * 
 * @param M                 Matrix to be factorized
 * @param d                 Diagonal parameters @f$\alpha@f$ and @f$n@f$
 * @param sym               Symbolics of the factorization
 * @param ordering_method   Indicator to choose the ordering method: @a AMD, @a NO_ORDERING or @a GIVEN_ORDERING
 * @param LD                Output struct containing the @f$LDL^T@f$ factors
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_factorize_with_diag(ladel_sparse_matrix *M, 
                                    ladel_diag          d, 
                                    ladel_symbolics     *sym, 
                                    ladel_int           ordering_method, 
                                    ladel_factor        **LD, 
                                    ladel_work          *work);

/**
 * Computes the @f$LDL^T@f$ factorization of @f$M,@f$ but allocates based on @a Mbasis.
 * 
 * This routine is used for subsequent update routines. LADEL assumes the user knows in advance
 * the possible updates (at least the pattern), so that it can allocate the factor once. Dynamic 
 * reallocation during update routines is currently not supported.
 * 
 * @param M                 Matrix to be factorized
 * @param sym               Symbolics of the factorization
 * @param ordering_method   Indicator to choose the ordering method: @a AMD, @a NO_ORDERING or @a GIVEN_ORDERING
 * @param LD                Output struct containing the @f$LDL^T@f$ factors
 * @param Mbasis            Matrix that is used in the symbolic part of the factorization to allocate LD
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_factorize_advanced( ladel_sparse_matrix *M, 
                                    ladel_symbolics     *sym, 
                                    ladel_int           ordering_method, 
                                    ladel_factor        **LD, 
                                    ladel_sparse_matrix *Mbasis, 
                                    ladel_work          *work);

/**
 * Computes the @f$LDL^T@f$ factorization of @f$M+ \alpha \begin{bmatrix}I_{n} & \\ & 0\end{bmatrix},@f$ but allocates based on @a Mbasis.
 * 
 * This routine is used for subsequent update routines. LADEL assumes the user knows in advance
 * the possible updates (at least the pattern), so that it can allocate the factor once. Dynamic 
 * reallocation during update routines is currently not supported.
 * 
 * @param M                 Matrix to be factorized
 * @param d                 Diagonal parameters @f$\alpha@f$ and @f$n@f$
 * @param sym               Symbolics of the factorization
 * @param ordering_method   Indicator to choose the ordering method: @a AMD, @a NO_ORDERING or @a GIVEN_ORDERING
 * @param LD                Output struct containing the @f$LDL^T@f$ factors
 * @param Mbasis            Matrix that is used in the symbolic part of the factorization to allocate LD
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_factorize_advanced_with_diag(   ladel_sparse_matrix *M, 
                                                ladel_diag          d, 
                                                ladel_symbolics     *sym, 
                                                ladel_int           ordering_method, 
                                                ladel_factor        **LD, 
                                                ladel_sparse_matrix *Mbasis, 
                                                ladel_work          *work);

/**
 * Computes the @f$LDL^T@f$ factorization of @f$M,@f$ provided @a LD was allocated before.
 * 
 * @param M                 Matrix to be factorized
 * @param sym               Symbolics of the factorization
 * @param LD                Output struct containing the @f$LDL^T@f$ factors
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_factorize_with_prior_basis( ladel_sparse_matrix *M, 
                                            ladel_symbolics     *sym, 
                                            ladel_factor        *LD, 
                                            ladel_work          *work);

/**
 * Computes the @f$LDL^T@f$ factorization of @f$M+ \alpha \begin{bmatrix}I_{n} & \\ & 0\end{bmatrix},@f$ 
 * provided @a LD was allocated before.
 * 
 * @param M                 Matrix to be factorized
 * @param d                 Diagonal parameters @f$\alpha@f$ and @f$n@f$
 * @param sym               Symbolics of the factorization
 * @param LD                Output struct containing the @f$LDL^T@f$ factors
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_factorize_with_prior_basis_with_diag(   ladel_sparse_matrix *M, 
                                                        ladel_diag          d, 
                                                        ladel_symbolics     *sym, 
                                                        ladel_factor        *LD, 
                                                        ladel_work          *work);

/**
 * Computes @f$y = LDL^T \backslash rhs@f$.
 * 
 * @param LD                Factors of an @f$LDL^T@f$ factorization
 * @param rhs               Dense right-hand side 
 * @param y                 Output vector
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_dense_solve(const ladel_factor  *LD, 
                            const ladel_double  *rhs, 
                            ladel_double        *y, 
                            ladel_work          *work);

/**
 * Updates an @f$LDL^T@f$ factorization.
 * 
 * If LD contains the factors of @f$M@f$ on input, LD will contain the factors of @f$M + up\textunderscore or\textunderscore down*factor^2*ww^T,@f$
 * where @f$w = W(:, col\textunderscore in\textunderscore W).@f$
 * 
 * @param LD                Factors of an @f$LDL^T@f$ factorization
 * @param sym               Associated symbolic information
 * @param W                 Sparse matrix containing the vector for the update
 * @param col_in_W          Column of W that is used for the update
 * @param factor            Scaling factor for the update vector
 * @param up_or_down        Flag indicating @a UPDATE or @a DOWNDATE 
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_rank1_update(   ladel_factor        *LD, 
                                ladel_symbolics     *sym, 
                                ladel_sparse_matrix *W, 
                                ladel_int           col_in_W, 
                                ladel_double        factor, 
                                ladel_int           up_or_down, 
                                ladel_work          *work);

/**
 * Updates an @f$LDL^T@f$ factorization.
 * 
 * If LD contains the factors of 
 * @f$M = \begin{bmatrix}
 * M_{11}   & 0 & M_{13} \\
 * 0        & 1 & 0      \\
 * M_{13}^T & 0 & M_{33}
 * \end{bmatrix} @f$ on input, LD will contain the factors of 
 * @f$\begin{bmatrix}
 * M_{11}   & m_{12} & M_{13}   \\
 * m_{12}^T & m_{22} & m_{32}^T \\
 * M_{13}^T & m_{32} & M_{33}
 * \end{bmatrix} @f$ on output, where @f$m = W(:, col\textunderscore in\textunderscore W),@f$ and 
 * @f$row\textunderscore in\textunderscore L = n + 1@f$ with @f$[n,n] = size(M_{11}).@f$
 * 
 * @param LD                Factors of an @f$LDL^T@f$ factorization
 * @param sym               Associated symbolic information
 * @param row_in_L          Position of the added row/column
 * @param W                 Sparse matrix containing the vector for the update
 * @param col_in_W          Column of W that is used for the update
 * @param diag              Diagonal element @f$m_{22}@f$
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_row_add(ladel_factor        *LD, 
                        ladel_symbolics     *sym, 
                        ladel_int           row_in_L, 
                        ladel_sparse_matrix *W, 
                        ladel_int           col_in_W, 
                        ladel_double        diag, 
                        ladel_work          *work);

/**
 * Updates an @f$LDL^T@f$ factorization.
 * 
 * If LD contains the factors of 
 * @f$\begin{bmatrix}
 * M_{11}   & m_{12} & M_{13}   \\
 * m_{12}^T & m_{22} & m_{32}^T \\
 * M_{13}^T & m_{32} & M_{33}
 * \end{bmatrix} @f$ on input, LD will contain the factors of
 * @f$M = \begin{bmatrix}
 * M_{11}   & 0 & M_{13} \\
 * 0        & 1 & 0      \\
 * M_{13}^T & 0 & M_{33}
 * \end{bmatrix} @f$ on output, where 
 * @f$row\textunderscore in\textunderscore L = n + 1@f$ with @f$[n,n] = size(M_{11}).@f$
 * 
 * @param LD                Factors of an @f$LDL^T@f$ factorization
 * @param sym               Associated symbolic information
 * @param row_in_L          Position of the deleted row/column
 * @param work              LADEL workspace
 * @return                  Status
 */
ladel_int ladel_row_del(ladel_factor    *LD, 
                        ladel_symbolics *sym, 
                        ladel_int       row_in_L, 
                        ladel_work      *work);

/**
 * @}
 */

#endif /*LADEL_H*/
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top