OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
sprsax.c
Go to the documentation of this file.
1 void sprsax(float sa[], unsigned long ija[], float x[], float b[],
2  unsigned long n) {
3  void nrerror(char error_text[]);
4  unsigned long i, k;
5 
6  if (ija[1] != n + 2) nrerror("sprsax: mismatched vector and matrix");
7  for (i = 1; i <= n; i++) {
8  b[i] = sa[i] * x[i];
9  for (k = ija[i]; k <= ija[i + 1] - 1; k++)
10  b[i] += sa[k] * x[ija[k]];
11 
12  }
13 }
void nrerror(char error_text[])
Definition: nrutil.c:7
void sprsax(float sa[], unsigned long ija[], float x[], float b[], unsigned long n)
Definition: sprsax.c:1
data_t b[NROOTS+1]
Definition: decode_rs.h:77
int i
Definition: decode_rs.h:71
int k
Definition: decode_rs.h:73