1LinearAlgebra(3)           Library Functions Manual           LinearAlgebra(3)
2
3
4

NAME

6       vpIdentity3,  vpIdentity4, vpNormalize3, vpMatrixVectorMult4, vpMatrix‐
7       Mult4, vpCrossProduct,  vpSolveSystem4,  vpSetVector3,  vpSetVector4  -
8       linear algebra routines
9

SYNOPSIS

11       #include <volpack.h>
12
13       void
14       vpIdentity3(m_dst)
15           vpMatrix3 m_dst;
16
17       void
18       vpIdentity4(m_dst)
19           vpMatrix4 m_dst;
20
21       vpResult
22       vpNormalize3(v_src1)
23           vpVector3 v_src1;
24
25       void
26       vpMatrixVectorMult4(v_dst, m_src1, v_src1)
27           vpVector4 v_dst;
28           vpMatrix4 m_src1;
29           vpVector4 v_src1;
30
31       void
32       vpMatrixMult4(m_dst, m_src1, m_src2)
33           vpVector4 m_dst, m_src1, m_src2;
34
35       void
36       vpCrossProduct(v_dst, v_src1, v_src2)
37           vpVector3 v_dst, v_src1, v_src2;
38
39       vpResult
40       vpSolveSystem4(m_src1, b, count)
41           vpMatrix4 m_src1;
42           vpVector4 b[];
43           int count;
44
45       void
46       vpSetVector3(v_dst, x, y, z)
47           vpVector3 v_dst;
48           double x, y, z;
49
50       void
51       vpSetVector4(v_dst, x, y, z, w)
52           vpVector4 v_dst;
53           double x, y, z, w;
54

ARGUMENTS

56       m_src1, m_src2, m_dst
57              Source and destination matrices.
58
59       v_src1, v_src2, v_dst
60              Source and destination vectors.
61
62       b      Array of right-hand-side vectors.
63
64       count  Number of right-hand-side vectors.
65
66       x, y, z, w
67              Vector components.
68

DESCRIPTION

70       These  routines form a simple linear algebra package used internally by
71       VolPack.  The routines are also available as utility routines  for  use
72       by the application.
73
74       vpIdentity3 assigns the identity matrix to a 3-by-3 matrix.
75
76       vpIdentity4 assigns the identity matrix to a 4-by-4 matrix.
77
78       vpNormalize3  normalizes  a 3-element vector (so the magnitude is 1.0).
79       The result overwrites the source vector.
80
81       vpMatrixVectorMult4 multiplies a 4-by-4 matrix by  a  4-element  column
82       vector  and  stores  the  result in the destination vector (v_dst = m .
83       v_src).
84
85       vpMatrixMult4 multiplies two 4-by-4 matrices and stores the  result  in
86       the destination matrix (m_dst = m_src1 . m_src2).
87
88       vpCrossProduct  computes the cross product of two 3-element vectors and
89       stores the result in the destination vector (v_dst = v_src1 x v_src2).
90
91       vpSolveSystem4 solves the linear system m . x = b for each  right-hand-
92       side vector in the b array.  The solution vectors overwrite the vectors
93       in the b array.  The solution is computed using  Gauss-Jordan  elimina‐
94       tion with partial pivoting and implicit scaling.
95
96       vpSetVector3  initializes the components of a 3-element vector (v_dst =
97       [x, y, z]).  It is a macro.
98
99       vpSetVector4 initializes the components of a 4-element vector (v_dst  =
100       [x, y, z, w]).  It is a macro.
101

ERRORS

103       vpNormalize3  and  vpSolveSystem4 normally return VP_OK.  The following
104       error return value is possible:
105
106       VPERROR_SINGULAR
107              The vector is a 0 vector (vpNormalize3 only), or the  matrix  is
108              singular (vpSolveSystem4 only).
109

SEE ALSO

111       VolPack(3)
112
113
114
115VolPack                                                       LinearAlgebra(3)
Impressum