GRASS 8 Programmer's Manual
8.5.0(2026)-8d6ceba290
Toggle main menu visibility
Loading...
Searching...
No Matches
otrsm.c
Go to the documentation of this file.
1
/* otrsm.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
void
otrsm
(
double
*sm,
double
*a,
double
*
b
,
int
n)
10
{
11
double
z, *q0, *p, *s, *
t
;
12
13
int
i, j, k;
14
15
q0 = (
double
*)calloc(n,
sizeof
(
double
));
16
for
(i = 0; i < n; ++i) {
17
for
(j = 0,
t
=
b
; j < n; ++j) {
18
for
(k = 0, s = a + i * n, z = 0.; k < n; ++k)
19
z += *
t
++ * *s++;
20
q0[j] = z;
21
}
22
for
(j = 0, p = sm + i,
t
= a; j <= i; ++j, p += n) {
23
for
(k = 0, s = q0, z = 0.; k < n; ++k)
24
z += *
t
++ * *s++;
25
*p = z;
26
if
(j < i)
27
sm[i * n + j] = z;
28
}
29
}
30
free(q0);
31
}
b
double b
Definition
driver/set_window.c:5
t
double t
Definition
driver/set_window.c:5
otrsm
void otrsm(double *sm, double *a, double *b, int n)
Definition
otrsm.c:9
external
ccmath
otrsm.c
Generated on
for GRASS 8 Programmer's Manual by
1.17.0