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

  • d3c1510
  • /
  • ladel_add.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.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:428296aeae75bb734365575defb9183ddbad9a63
directory badge Iframe embedding
swh:1:dir:d3c1510be47586da317303bf0d52a9da0f013bf2
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.

  • content
  • directory
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_add.h
/**
 * @file ladel_add.h
 * @author Ben Hermans
 * @brief Routines to add matrices.
 * @details The add_matrices and add_matrices_pattern routines compute the scaled addition 
 * of the matrices provided or of the patterns of the matrices respectively.  
 */

#ifndef LADEL_ADD_H
#define LADEL_ADD_H

#include "ladel_types.h"

/**
 * Returns a sparse matrix @f$C = \alpha A + \beta B@f$.
 * 
 * @param alpha Scaling for the first matrix
 * @param A     The first matrix
 * @param beta  Scaling for the second matrix
 * @param B     The second matrix
 * @param work  LADEL workspace
 * @return      @f$C = \alpha A + \beta B@f$
 */ 
ladel_sparse_matrix *ladel_add_matrices(ladel_double        alpha, 
                                        ladel_sparse_matrix *A, 
                                        ladel_double        beta, 
                                        ladel_sparse_matrix *B, 
                                        ladel_work          *work);

/**
 * Returns a pattern matrix whose pattern includes the patterns of @a A and @a B.
 * 
 * @param A     The first matrix
 * @param B     The second matrix
 * @param work  LADEL workspace
 * @return      A sparse matrix whose pattern contains that of @a A and @a B
 */
ladel_sparse_matrix *ladel_add_matrices_pattern(ladel_sparse_matrix* A, 
                                                ladel_sparse_matrix *B, 
                                                ladel_work          *work);

/**
 * Returns a sparse matrix @f$C = \alpha A + \beta B@f$ if @a values==TRUE, or a pattern matrix
 * that includes the patterns of @a A and @a B if @a values==FALSE.
 * 
 * @param alpha     Scaling for the first matrix
 * @param A         The first matrix
 * @param beta      Scaling for the second matrix
 * @param B         The second matrix
 * @param values    Flag to choose between values and just pattern
 * @param work      LADEL workspace
 * @return          @f$C = \alpha A + \beta B@f$ or the sum of the patterns
 */ 
ladel_sparse_matrix *ladel_add_matrices_advanced(   ladel_double        alpha, 
                                                    ladel_sparse_matrix *A, 
                                                    ladel_double        beta, 
                                                    ladel_sparse_matrix *B, 
                                                    ladel_int           values, 
                                                    ladel_work          *work);

#endif /* LADEL_ADD_H */

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