GRASS GIS 8 Programmer's Manual
8.4.1(2025)-45ca3179ab
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
}
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
external
ccmath
vmul.c
Generated on Sat Jun 21 2025 21:07:27 for GRASS GIS 8 Programmer's Manual by
1.13.2