GRASS GIS 8 Programmer's Manual
8.5.0dev(2025)-565e82de51
Main Page
Related Pages
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
x
y
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
r
s
t
u
v
w
y
Enumerations
a
c
d
e
h
i
j
l
m
n
o
p
r
s
t
v
y
Enumerator
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
cmmult.c
Go to the documentation of this file.
1
/* cmmult.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
9
#include <
stdlib.h
>
10
#include "
ccmath.h
"
11
12
void
cmmult
(
Cpx
*cm,
Cpx
*a,
Cpx
*
b
,
int
n,
int
m,
int
l
)
13
{
14
Cpx
z, *q0, *p, *q;
15
16
int
i, j, k;
17
18
q0 = (
Cpx
*)calloc(m,
sizeof
(
Cpx
));
19
for
(i = 0; i <
l
; ++i, ++cm) {
20
for
(k = 0, p =
b
+ i; k < m; p +=
l
)
21
q0[k++] = *p;
22
for
(j = 0, p = a, q = cm; j < n; ++j, q +=
l
) {
23
for
(k = 0, z.
re
= z.
im
= 0.; k < m; ++k, ++p) {
24
z.
re
+= p->
re
* q0[k].
re
- p->
im
* q0[k].
im
;
25
z.
im
+= p->
im
* q0[k].
re
+ p->
re
* q0[k].
im
;
26
}
27
*q = z;
28
}
29
}
30
free
(q0);
31
}
ccmath.h
cmmult
void cmmult(Cpx *cm, Cpx *a, Cpx *b, int n, int m, int l)
Definition:
cmmult.c:12
b
double b
Definition:
r_raster.c:39
l
double l
Definition:
r_raster.c:39
free
void free(void *)
stdlib.h
complex
Definition:
ccmath.h:38
complex::re
double re
Definition:
ccmath.h:39
complex::im
double im
Definition:
ccmath.h:39
lib
external
ccmath
cmmult.c
Generated on Thu Mar 20 2025 07:33:23 for GRASS GIS 8 Programmer's Manual by
1.9.1