Go to the source code of this file.
Functions | |
| void | dsprstx (double xx[], double bb[], int n) |
|
||||||||||||||||
|
Definition at line 30 of file dsprstx.h. References ija, printf(), and sa. Referenced by atimes(). 00031 { 00032 int i,j,k; 00033 00034 if(ija[1]!=n+2){ 00035 printf("dsprstx error : mismatched vector and matrix!"); 00036 exit(0); 00037 } 00038 for(i=1;i<=n;i++) bb[i]=sa[i]*xx[i]; 00039 for(i=1;i<=n;i++){ 00040 for(k=ija[i];k<=ija[i+1]-1;k++){ // loop over off-diagonal terms 00041 j=ija[k]; 00042 bb[j]+=sa[k]*xx[i]; 00043 } 00044 } 00045 }
|