GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LinearAlgebra(3) FreeBSD Library Functions Manual LinearAlgebra(3)

vpIdentity3, vpIdentity4, vpNormalize3, vpMatrixVectorMult4, vpMatrixMult4, vpCrossProduct, vpSolveSystem4, vpSetVector3, vpSetVector4 - linear algebra routines

#include <volpack.h>

void

vpIdentity3(m_dst)

vpMatrix3 m_dst;

void

vpIdentity4(m_dst)

vpMatrix4 m_dst;

vpResult

vpNormalize3(v_src1)

vpVector3 v_src1;

void

vpMatrixVectorMult4(v_dst, m_src1, v_src1)

vpVector4 v_dst;
vpMatrix4 m_src1;
vpVector4 v_src1;

void

vpMatrixMult4(m_dst, m_src1, m_src2)

vpVector4 m_dst, m_src1, m_src2;

void

vpCrossProduct(v_dst, v_src1, v_src2)

vpVector3 v_dst, v_src1, v_src2;

vpResult

vpSolveSystem4(m_src1, b, count)

vpMatrix4 m_src1;
vpVector4 b[];
int count;

void

vpSetVector3(v_dst, x, y, z)

vpVector3 v_dst;
double x, y, z;

void

vpSetVector4(v_dst, x, y, z, w)

vpVector4 v_dst;
double x, y, z, w;

m_src1, m_src2, m_dst
Source and destination matrices.
v_src1, v_src2, v_dst
Source and destination vectors.
b
Array of right-hand-side vectors.
count
Number of right-hand-side vectors.
x, y, z, w
Vector components.

These routines form a simple linear algebra package used internally by VolPack. The routines are also available as utility routines for use by the application.

vpIdentity3 assigns the identity matrix to a 3-by-3 matrix.

vpIdentity4 assigns the identity matrix to a 4-by-4 matrix.

vpNormalize3 normalizes a 3-element vector (so the magnitude is 1.0). The result overwrites the source vector.

vpMatrixVectorMult4 multiplies a 4-by-4 matrix by a 4-element column vector and stores the result in the destination vector (v_dst = m . v_src).

vpMatrixMult4 multiplies two 4-by-4 matrices and stores the result in the destination matrix (m_dst = m_src1 . m_src2).

vpCrossProduct computes the cross product of two 3-element vectors and stores the result in the destination vector (v_dst = v_src1 x v_src2).

vpSolveSystem4 solves the linear system m . x = b for each right-hand-side vector in the b array. The solution vectors overwrite the vectors in the b array. The solution is computed using Gauss-Jordan elimination with partial pivoting and implicit scaling.

vpSetVector3 initializes the components of a 3-element vector (v_dst = [x, y, z]). It is a macro.

vpSetVector4 initializes the components of a 4-element vector (v_dst = [x, y, z, w]). It is a macro.

vpNormalize3 and vpSolveSystem4 normally return VP_OK. The following error return value is possible:
VPERROR_SINGULAR
The vector is a 0 vector (vpNormalize3 only), or the matrix is singular (vpSolveSystem4 only).

VolPack(3)
VolPack

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.