GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
smgen.c
Go to the documentation of this file.
1 /* smgen.c CCMATH mathematics library source code.
2  *
3  * Copyright (C) 2000 Daniel A. Atkinson All rights reserved.
4  * This code may be redistributed under the terms of the GNU library
5  * public license (LGPL). ( See the lgpl.license file for details.)
6  * ------------------------------------------------------------------------
7  */
8 void smgen(double *a, double *eval, double *evec, int n)
9 {
10  double *p, *q, *ps, *r, *s, *t, *v = evec + n * n;
11 
12  for (ps = a, p = evec; p < v; p += n) {
13  for (q = evec; q < v; q += n, ++ps) {
14  *ps = 0.;
15  for (r = eval, s = p, t = q; r < eval + n;)
16  *ps += *r++ * *s++ * *t++;
17  }
18  }
19 }
tuple q
Definition: forms.py:2019
float r
Definition: named_colr.c:8
void smgen(double *a, double *eval, double *evec, int n)
Definition: smgen.c:8
int n
Definition: dataquad.c:291