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 22a32967b4fed9222e6ab91ea80193ffb73d13b8 authored by Ben Hermans on 22 April 2020, 17:19:39 UTC, committed by Ben Hermans on 22 April 2020, 17:19:39 UTC
Function to permute sparse vectors (with the result having sorted indices)
1 parent aafe189
  • Files
  • Changes
  • 04016fa
  • /
  • include
  • /
  • types.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:22a32967b4fed9222e6ab91ea80193ffb73d13b8
directory badge Iframe embedding
swh:1:dir:db73009e148375580176b9843da830661db67542
content badge Iframe embedding
swh:1:cnt:2f03755f75994d13311ea74619fd61d19c2e4f68
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 ...
types.h
#ifndef LADEL_TYPES_H
#define LADEL_TYPES_H

#ifdef DFLOAT
    typedef float ladel_double;
#else
    typedef double ladel_double;
#endif

#ifdef DLONG
    typedef long ladel_int;
#else
    typedef int ladel_int;
#endif

typedef struct compressed_column_sparse_matrix 
{
    ladel_int nzmax; /**< number of nonzeros */
    ladel_int nrow; /**< number of rows */
    ladel_int ncol; /**< number of columns */

    ladel_int *p; /**< column pointers (size ncol+1) */
    ladel_int *i; /**< row pointers (size nzmax) */
    ladel_double *x; /**< numerical values (size nzmax) */

    ladel_int *nz; /** < number of elements in each column (size ncol) */

    ladel_int values; /**< has numerical values */
    ladel_int symmetry; /**< type of symmetry */    

} ladel_sparse_matrix;

typedef struct symbolic_cholesky_information
{
    ladel_int ncol; /**<  number of columns in the analyzed matrix */
    ladel_int *etree; /**< eliminations tree*/
    ladel_int *postorder; /**< postordiring of the elimination tree */
    ladel_int *col_counts; /** < column counts, stored as column pointers */
    ladel_int *p; /** < fill-reducing ordering (AMD) */
    ladel_int *pattern; /** < stores the nonzero pattern of a row of L */ 
    ladel_int *nodes; /** < keeps track of which nodes have been marked */
} ladel_symbolics;

typedef struct ldl_factors
{
    ladel_int ncol;         /**< number of columns in the analyzed matrix */
    ladel_sparse_matrix *L; /**< L in LDL' factorization */
    ladel_double *D;        /**< D in LDL' factorization (stored as vector) */
    ladel_double *Dinv;     /**< D^-1 in LDL' factorization (stored as vector) */
    ladel_int *p;           /**< permutation vector */
} ladel_factor;

typedef struct ladel_set_struct {
    ladel_int *set;
    ladel_int size_set;
    ladel_int max_size_set;
} ladel_set;

typedef struct ladel_col_struct {
    ladel_int *i;
    ladel_double *x;
    ladel_int nz;
    ladel_int nzmax;
} ladel_col;

/* Workspace needed for the factorization and updates */
typedef struct workspace
{
    ladel_set *set_preallocated1;
    ladel_set *set_preallocated2;
    ladel_set *set_preallocated3;
    ladel_set *set_unallocated_values1;
    ladel_set *set_unallocated_values2;
    ladel_set *set_unallocated_values3;
    ladel_int *array_int_ncol1;
    ladel_int *array_int_ncol2;
    ladel_int *array_int_ncol3;
    ladel_int *array_int_ncol4;
    ladel_double *array_double_all_zeros_ncol1;
} ladel_work;

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

back to top

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