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_constants.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:27185f79b8cc586445828772bc6bb4b556e5d613
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_constants.h
/**
 * @file ladel_constants.h
 * @author Ben Hermans
 * @brief Constants and macros used in LADEL.
 */

#ifndef LADEL_CONSTANTS_H
#define LADEL_CONSTANTS_H

/**
 * @name Constants
 * @{
 */


#define TRUE 1 /**< For booleans */
#define FALSE 0 /**< For booleans */

#define SUCCESS 1 /**< For status returns */
#define FAIL -1 /**< For status returns */

#define NONE -1 /**< Indicates a root (a node without parent), or an untouched node */

#define UNSYMMETRIC 0 /**< No symmetry is assumed in the matrix */
#define UPPER 1 /**< Use only upper part of matrix */
#define LOWER -1 /**< Use only lower part of matrix */

#define AMD 1 /**< Ordering method during the symbolic part of the factorization */
#define NO_ORDERING 0 /**< No ordering is performed during the symbolic part of the factorization */
#define GIVEN_ORDERING 2 /**< The ordering was computed previously and is already stored in sym->p */

#define MARKED 1 /**< Indicate whether a node is marked */
#define UNMARKED 0 /**< Indicate whether a node is not marked */

#define SET_HAS_CHANGED TRUE /**< Possible return value of ladel_set_union indicating the set has changed */
#define SET_HAS_NOT_CHANGED FALSE /**< Possible return value of ladel_set_union indicating the set has not changed */
#define MAX_SET_SIZE_EXCEEDED NONE /**< Possible return value of ladel_set_union indicating the set has grown beyond the maximum size */

#define UPDATE TRUE /**< Flag in rank1_update to perform an update */
#define DOWNDATE FALSE /**< Flag in rank1_update to perform a downdate */

/**
 * @}
 */

/**
 * @name Macros
 * @{
 */

#define LADEL_MAX(a, b) ((a) > (b) ? (a) : (b)) /**< Return the maximum of two numbers */
#define LADEL_MIN(a, b) ((a) > (b) ? (b) : (a)) /**< Return the minimum of two numbers */
#define LADEL_ABS(a) ((a) < 0 ? -(a) : (a))     /**< Return the absolute value a number */

#define LADEL_FOR(index, M, col) for(index = (M)->p[(col)]; index < (((M)->nz) ? (M)->p[(col)] + (M)->nz[(col)] : (M)->p[(col)+1]); index++) /**< Loop through a column of a sparse matrix */

#define IS_ROOT(col, etree) ((etree)[(col)] == NONE) /**< Check whether a node is a root (i.e. has no parent) */

#define MARK(nodes, k) (nodes[(k)] = MARKED) /**< Mark the k-th node */
#define UNMARK(nodes, k) (nodes[(k)] = UNMARKED) /**< Unmark the k-th node */
#define IS_MARKED(nodes, k) (nodes[(k)] == MARKED) /**< Check whether the k-th node is marked */

/**
 * @}
 */

#endif /*LADEL_CONSTANTS_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