Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
x
y
+
Typedefs
a
d
i
p
q
r
s
t
Enumerations
+
Enumerator
a
b
c
d
e
f
g
h
i
l
n
o
p
r
s
t
u
v
w
x
z
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
+
Enumerator
_
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Related Functions
a
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
x
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
w
x
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
p
q
r
s
t
u
v
x
z
+
Typedefs
a
b
c
d
e
f
g
i
l
m
n
r
s
t
u
+
Enumerations
a
b
c
d
e
g
h
i
l
m
n
o
p
q
r
s
t
u
v
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
+
Macros
_
a
b
c
d
e
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
external_packages
csparse
cs_norm.c
Go to the documentation of this file.
1
#include "
cs.h
"
2
/* 1-norm of a sparse matrix = max (sum (abs (A))), largest column sum */
3
double
cs_norm
(
const
cs
*
A
)
4
{
5
int
p, j, n, *Ap ;
6
double
*Ax, norm = 0, s ;
7
if
(!
CS_CSC
(A) || !A->
x
)
return
(-1) ;
/* check inputs */
8
n = A->
n
; Ap = A->
p
; Ax = A->
x
;
9
for
(j = 0 ; j < n ; j++)
10
{
11
for
(s = 0, p = Ap [j] ; p < Ap [j+1] ; p++) s += fabs (Ax [p]) ;
12
norm =
CS_MAX
(norm, s) ;
13
}
14
return
(norm) ;
15
}
example1.A
A
Definition:
example1.py:34
cs_sparse::n
int n
Definition:
cs.h:20
cs_norm
double cs_norm(const cs *A)
Definition:
cs_norm.c:3
CS_MAX
#define CS_MAX(a, b)
Definition:
cs.h:134
cs.h
CS_CSC
#define CS_CSC(A)
Definition:
cs.h:140
cs_sparse::p
int * p
Definition:
cs.h:21
cs_sparse
Definition:
cs.h:16
cs_sparse::x
double * x
Definition:
cs.h:23
acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Feb 28 2022 21:31:52