GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
hmgen.c
Go to the documentation of this file.
1 /* hmgen.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 #include <stdlib.h>
9 #include "ccmath.h"
10 void hmgen(Cpx * h, double *ev, Cpx * u, int n)
11 {
12  Cpx *v, *p;
13 
14  int i, j;
15 
16  double e;
17 
18  v = (Cpx *) calloc(n * n, sizeof(Cpx));
19  cmcpy(v, u, n * n);
20  hconj(v, n);
21  for (i = 0, p = v; i < n; ++i) {
22  for (j = 0, e = ev[i]; j < n; ++j, ++p) {
23  p->re *= e;
24  p->im *= e;
25  }
26  }
27  cmmul(h, u, v, n);
28  free(v);
29 }
void hconj(Cpx *u, int n)
Definition: hconj.c:9
void cmcpy(Cpx *a, Cpx *b, int n)
Definition: cmcpy.c:9
void cmmul(Cpx *c, Cpx *a, Cpx *b, int n)
Definition: cmmul.c:9
void hmgen(Cpx *h, double *eval, Cpx *u, int n)
Definition: hmgen.c:10
double re
Definition: ccmath.h:38
double im
Definition: ccmath.h:38
void free(void *)
Definition: ccmath.h:38
int n
Definition: dataquad.c:291
tuple h
panel.defaultSize = wx.CheckBox(panel, id = wx.ID_ANY, label = _(&quot;Use default size&quot;)) panel...