GRASS 8 Programmer's Manual
8.6.0dev(2026)-ddeab64dbf
Loading...
Searching...
No Matches
vmul.c
Go to the documentation of this file.
1
/* vmul.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
vmul
(
double
*
vp
,
double
*
mat
,
double
*v,
int
n)
9
{
10
double
s, *q;
11
12
int
k, i;
13
14
for
(k = 0; k < n; ++k) {
15
for
(i = 0, q = v, s = 0.; i < n; ++i)
16
s += *
mat
++ * *q++;
17
*
vp
++ = s;
18
}
19
}
20
21
double
vnrm
(
double
*u,
double
*v,
int
n)
22
{
23
double
s;
24
25
int
i;
26
27
for
(i = 0, s = 0.; i < n; ++i)
28
s += *u++ * *v++;
29
return
s;
30
}
AMI_STREAM
Definition
ami_stream.h:153
vnrm
double vnrm(double *u, double *v, int n)
Definition
vmul.c:21
vmul
void vmul(double *vp, double *mat, double *v, int n)
Definition
vmul.c:8
lib
external
ccmath
vmul.c
Generated on Sun Apr 5 2026 06:59:55 for GRASS 8 Programmer's Manual by
1.9.8