Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
external_packages
csparse
cs_gaxpy.c
Go to the documentation of this file.
1
#include "
cs.h
"
2
/* y = A*x+y */
3
int
cs_gaxpy
(
const
cs
*
A
,
const
double
*x,
double
*
y
)
4
{
5
int
p, j, n, *Ap, *Ai ;
6
double
*Ax ;
7
if
(!
CS_CSC
(A) || !x || !y)
return
(0) ;
/* check inputs */
8
n = A->
n
; Ap = A->
p
; Ai = A->
i
; Ax = A->
x
;
9
for
(j = 0 ; j < n ; j++)
10
{
11
for
(p = Ap [j] ; p < Ap [j+1] ; p++)
12
{
13
y [Ai [p]] += Ax [p] * x [j] ;
14
}
15
}
16
return
(1) ;
17
}
example1.A
A
Definition:
example1.py:34
cs_sparse::n
int n
Definition:
cs.h:20
cs.h
CS_CSC
#define CS_CSC(A)
Definition:
cs.h:140
cs_sparse::p
int * p
Definition:
cs.h:21
cs_gaxpy
int cs_gaxpy(const cs *A, const double *x, double *y)
Definition:
cs_gaxpy.c:3
cs_sparse
Definition:
cs.h:16
cs_sparse::i
int * i
Definition:
cs.h:22
Eigen::internal::y
const Scalar & y
Definition:
Eigen/src/Core/MathFunctions.h:433
cs_sparse::x
double * x
Definition:
cs.h:23
acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:31