Last change
on this file since 767 was 731, checked in by tbretz, 24 years ago |
*** empty log message ***
|
-
Property svn:executable
set to
*
|
File size:
1.0 KB
|
Line | |
---|
1 | #include "slalib.h"
|
---|
2 | #include "slamac.h"
|
---|
3 | void slaDimxv ( double dm[3][3], double va[3], double vb[3] )
|
---|
4 | /*
|
---|
5 | ** - - - - - - - - -
|
---|
6 | ** s l a D i m x v
|
---|
7 | ** - - - - - - - - -
|
---|
8 | **
|
---|
9 | ** Performs the 3-d backward unitary transformation:
|
---|
10 | **
|
---|
11 | ** vector vb = (inverse of matrix dm) * vector va
|
---|
12 | **
|
---|
13 | ** (double precision)
|
---|
14 | **
|
---|
15 | ** (n.b. The matrix must be unitary, as this routine assumes that
|
---|
16 | ** the inverse and transpose are identical)
|
---|
17 | **
|
---|
18 | **
|
---|
19 | ** Given:
|
---|
20 | ** dm double[3][3] matrix
|
---|
21 | ** va double[3] vector
|
---|
22 | **
|
---|
23 | ** Returned:
|
---|
24 | ** vb double[3] result vector
|
---|
25 | **
|
---|
26 | ** Note: va and vb may be the same array.
|
---|
27 | **
|
---|
28 | ** Last revision: 6 November 1999
|
---|
29 | **
|
---|
30 | ** Copyright P.T.Wallace. All rights reserved.
|
---|
31 | */
|
---|
32 | {
|
---|
33 | int i, j;
|
---|
34 | double w, vw[3];
|
---|
35 |
|
---|
36 | /* Inverse of matrix dm * vector va -> vector vw */
|
---|
37 | for ( j = 0; j < 3; j++ ) {
|
---|
38 | w = 0.0;
|
---|
39 | for ( i = 0; i < 3; i++ ) {
|
---|
40 | w += dm[i][j] * va[i];
|
---|
41 | }
|
---|
42 | vw[j] = w;
|
---|
43 | }
|
---|
44 |
|
---|
45 | /* Vector vw -> vector vb */
|
---|
46 | for ( j = 0; j < 3; j++ ) {
|
---|
47 | vb[j] = vw[j];
|
---|
48 | }
|
---|
49 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.