SuperSCS  1.3.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Typedefs | Functions
cs.h File Reference
#include "glbopts.h"

Go to the source code of this file.

Data Structures

struct  scs_cs_sparse
 Matrix in compressed-column or triplet form. More...
 

Typedefs

typedef struct scs_cs_sparse scs_cs
 Matrix in compressed-column or triplet form. More...
 

Functions

scs_csscs_cs_compress (const scs_cs *T)
 Compress a triplet matrix into a column-packed representation. More...
 
scs_csscs_cs_done (scs_cs *C, void *w, void *x, scs_int ok)
 Frees the memory of x and w>. More...
 
scs_csscs_cs_spalloc (scs_int m, scs_int n, scs_int nzmax, scs_int values, scs_int triplet)
 Allocates a sparse matrix of given dimensions. More...
 
scs_csscs_cs_spfree (scs_cs *A)
 
scs_float scs_cs_cumsum (scs_int *p, scs_int *c, scs_int n)
 
scs_intscs_cs_pinv (scs_int const *p, scs_int n)
 
scs_csscs_cs_symperm (const scs_cs *A, const scs_int *pinv, scs_int values)
 

Typedef Documentation

typedef struct scs_cs_sparse scs_cs

Matrix in compressed-column or triplet form.

This is a subset of the routines in the CSPARSE package by Tim Davis et. al. For the full package please visit http://www.cise.ufl.edu/research/sparse/CSparse/.

Note
In order to avoid conflicts in case some users want to load both SuperSCS and CSPARSE in their project, we have prepended the prefix scs_ in all function names here (although not necessary, we did it in static functions for uniformity.

Function Documentation

scs_cs* scs_cs_compress ( const scs_cs T)

Compress a triplet matrix into a column-packed representation.

scs_float scs_cs_cumsum ( scs_int p,
scs_int c,
scs_int  n 
)
scs_cs* scs_cs_done ( scs_cs C,
void *  w,
void *  x,
scs_int  ok 
)

Frees the memory of x and w>.

If ok is nonzero, it returns C, otherwise it frees C (it calls scs_cs_spfree) and returns SCS_NULL.

Parameters
C
w
x
ok
Returns
scs_int* scs_cs_pinv ( scs_int const *  p,
scs_int  n 
)
scs_cs* scs_cs_spalloc ( scs_int  m,
scs_int  n,
scs_int  nzmax,
scs_int  values,
scs_int  triplet 
)

Allocates a sparse matrix of given dimensions.

Parameters
mnumber of rows
nnumber of columns
nzmaxmaximum number of nonzero elements
valueswhether to allocate memory for the matrix values
tripletwhether the triplet representation is used
Returns
scs_cs* scs_cs_spfree ( scs_cs A)
scs_cs* scs_cs_symperm ( const scs_cs A,
const scs_int pinv,
scs_int  values 
)