LinearAlgebra(3)
β¨ LinearAlgebra(3) β¨
okay so bestie, welcome to LinearAlgebra(3), straight from the Library Functions Manual. this is the linear algebra routine pack, and it's giving slay math but make it cute. let's get into it. π
πΈ NAME πΈ
vpIdentity3, vpIdentity4, vpNormalize3, vpMatrixVectorMult4, vpMatrixMult4, vpCrossProduct, vpSolveSystem4, vpSetVector3, vpSetVector4 β linear algebra routines
β¨ SYNOPSIS β¨
#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;
π ARGUMENTS π
m_src1,m_src2,m_dstβ source and destination matrices. yes, matrices. iconic.v_src1,v_src2,v_dstβ source and destination vectors. vectors, bestie.bβ array of right-hand-side vectors.countβ number of right-hand-side vectors.x,y,z,wβ vector components.
π¦ DESCRIPTION π¦
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. lowkey essential.vpIdentity4β assigns the identity matrix to a 4-by-4 matrix. also iconic.vpNormalize3β normalizes a 3-element vector (so the magnitude is1.0). The result overwrites the source vector. no cap, it literally replaces it.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 systemm . x = bfor each right-hand-side vector in thebarray. The solution vectors overwrite the vectors in thebarray. 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.
not me putting macros in the linear algebra section π but here we are.
π ERRORS π
vpNormalize3 and vpSolveSystem4 normally return VP_OK. The following error return value is possible:
VPERROR_SINGULARβ The vector is a 0 vector (vpNormalize3only), or the matrix is singular (vpSolveSystem4only).
π SEE ALSO π
source/version: VolPack Β· page: LinearAlgebra(3) Β· date: not listed on this page. stay slay, bestie π
π¦ where this page comes from
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- Copyright (c) 1995-2008, Stanford University
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms