Woolz Image Processing
Version 1.7.5
|
Files | |
file | AlgVectorMath.c |
Basic vector arithmatic. | |
Functions | |
void | AlgVectorZero (double *aV, size_t n) |
sets all elements of the given vector to zero. More... | |
double | AlgVectorNorm (double *aV, size_t n) |
Computes the norm of the given vector \(\mathbf{a}\) with n elements: \[ \|\mathbf{a}\| = \sqrt{\mathbf{a} \cdot \mathbf{a}}. \] . More... | |
double | AlgVectorDot (double *aV, double *bV, size_t n) |
Computes the scalar (dot) product of the two vectors \(\mathbf{a}\) and \(\mathbf{b}\) each with n elements: \[ \mathbf{a} \cdot \mathbf{b} = \sum_{i = 0}^{n - 1}{a_i b_i} \] . More... | |
void | AlgVectorAdd (double *aV, double *bV, double *cV, size_t n) |
Adds vector \(\mathbf{b}\) to vector \(\mathbf{c}\). Computes \(a_i = b_i + c_i, \forall i \in [0 \ldots n - 1]\). More... | |
void | AlgVectorSub (double *aV, double *bV, double *cV, size_t n) |
Subtracts vector \(\mathbf{c}\) from vector \(\mathbf{b}\). Computes \(a_i = b_i - c_i, \forall i \in [0 \ldots n - 1]\). More... | |
void | AlgVectorCopy (double *aV, double *bV, size_t n) |
Copies one vector \(\mathbf{b}\) to vector \(\mathbf{a}\). \(a_i = b_i, \forall i \in [0 \ldots n - 1]\). More... | |
void AlgVectorZero | ( | double * | aV, |
size_t | n | ||
) |
sets all elements of the given vector to zero.
aV | Given vector. |
n | Number of elements. |
Referenced by AlgMatrixTVectorMul().
double AlgVectorNorm | ( | double * | aV, |
size_t | n | ||
) |
Computes the norm of the given vector \(\mathbf{a}\) with n elements:
\[ \|\mathbf{a}\| = \sqrt{\mathbf{a} \cdot \mathbf{a}}. \]
.
aV | Given vector \(\mathbf{a}\), |
n | Number of elements in \(\mathbf{a}\). |
References AlgVectorDot().
Referenced by AlgMatrixCGSolve(), and AlgMatrixSolveLSQR().
double AlgVectorDot | ( | double * | aV, |
double * | bV, | ||
size_t | n | ||
) |
Computes the scalar (dot) product of the two vectors \(\mathbf{a}\) and \(\mathbf{b}\) each with n elements:
\[ \mathbf{a} \cdot \mathbf{b} = \sum_{i = 0}^{n - 1}{a_i b_i} \]
.
aV | Vector \(\mathbf{a}\). |
bV | Vector \(\mathbf{b}\). |
n | Number of elements in each of the vectors. |
Referenced by AlgMatrixCGSolve(), and AlgVectorNorm().
void AlgVectorAdd | ( | double * | aV, |
double * | bV, | ||
double * | cV, | ||
size_t | n | ||
) |
Adds vector \(\mathbf{b}\) to vector \(\mathbf{c}\). Computes \(a_i = b_i + c_i, \forall i \in [0 \ldots n - 1]\).
aV | Vector \(\mathbf{a}\). |
bV | Vector \(\mathbf{b}\). |
cV | Vector \(\mathbf{c}\). |
n | Number of elements in each of the vectors. |
void AlgVectorSub | ( | double * | aV, |
double * | bV, | ||
double * | cV, | ||
size_t | n | ||
) |
Subtracts vector \(\mathbf{c}\) from vector \(\mathbf{b}\). Computes \(a_i = b_i - c_i, \forall i \in [0 \ldots n - 1]\).
aV | Vector \(\mathbf{a}\). |
bV | Vector \(\mathbf{b}\). |
cV | Vector \(\mathbf{c}\). |
n | Number of elements in each of the vectors. |
Referenced by AlgMatrixCGSolve().
void AlgVectorCopy | ( | double * | aV, |
double * | bV, | ||
size_t | n | ||
) |
Copies one vector \(\mathbf{b}\) to vector \(\mathbf{a}\). \(a_i = b_i, \forall i \in [0 \ldots n - 1]\).
aV | Vector \(\mathbf{a}\). |
bV | Vector \(\mathbf{b}\). |
n | Number of elements in each of the vectors. |
Referenced by AlgMatrixCGSolve(), AlgMatrixCopy(), AlgMatrixSolveLSQR(), AlgMatrixTVectorMulAdd(), and WlzAffineTransformLSqDQ3D().