SuperSCS  1.3.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cs.h
Go to the documentation of this file.
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2017 Pantelis Sopasakis (https://alphaville.github.io),
5  * Krina Menounou (https://www.linkedin.com/in/krinamenounou),
6  * Panagiotis Patrinos (http://homes.esat.kuleuven.be/~ppatrino)
7  * Copyright (c) 2012 Brendan O'Donoghue (bodonoghue85@gmail.com)
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a copy
10  * of this software and associated documentation files (the "Software"), to deal
11  * in the Software without restriction, including without limitation the rights
12  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13  * copies of the Software, and to permit persons to whom the Software is
14  * furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included in all
17  * copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25  * SOFTWARE.
26  *
27  */
28 #ifndef SCS_CS_H_GUARD
29 #define SCS_CS_H_GUARD
30 
31 #include "glbopts.h"
32 
46 typedef struct scs_cs_sparse {
54 } scs_cs;
55 
59 scs_cs *scs_cs_compress(const scs_cs *T);
60 
61 
74 scs_cs *scs_cs_done(scs_cs *C, void *w, void *x, scs_int ok);
75 
87  scs_int m,
88  scs_int n,
89  scs_int nzmax,
90  scs_int values,
91  scs_int triplet);
92 
94 
96  scs_int *p,
97  scs_int *c,
98  scs_int n);
99 
101  scs_int const *p,
102  scs_int n);
103 
105  const scs_cs *A,
106  const scs_int *pinv,
107  scs_int values);
108 
109 #endif
scs_float * x
numerical values, size nzmax
Definition: cs.h:52
scs_int * p
column pointers (size n+1) or col indices (size nzmax)
Definition: cs.h:50
scs_int nzmax
maximum number of entries
Definition: cs.h:47
scs_int * scs_cs_pinv(scs_int const *p, 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>.
scs_float scs_cs_cumsum(scs_int *p, scs_int *c, scs_int n)
int scs_int
Definition: glbopts.h:96
scs_int m
number of rows
Definition: cs.h:48
scs_cs * scs_cs_symperm(const scs_cs *A, const scs_int *pinv, scs_int values)
scs_int n
number of columns
Definition: cs.h:49
scs_cs * scs_cs_spfree(scs_cs *A)
double scs_float
Definition: glbopts.h:100
scs_int nz
Number of entries in triplet matrix, -1 for compressed-col.
Definition: cs.h:53
Matrix in compressed-column or triplet form.
Definition: cs.h:46
scs_cs * scs_cs_compress(const scs_cs *T)
Compress a triplet matrix into a column-packed representation.
struct scs_cs_sparse scs_cs
Matrix in compressed-column or triplet form.
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.
scs_int * i
row indices, size nzmax
Definition: cs.h:51