GOBNILP
f164d83
|
Defines a data structure that represents a vector with values of type double, as well as defining some vector operations. More...
Functions | |
Bge_Vector * | BgeVectorCreate (int capacity) |
Creates a vector with a given capacity. More... | |
void | BgeVectorDelete (Bge_Vector **vec) |
Deallocates the memory associated with a vector. More... | |
double | BgeVectorDotProduct (Bge_Vector *vec_1, Bge_Vector *vec_2) |
Computes the dot product between two vectors. More... | |
void | BgeVectorScalarMultiplication (double scalar, Bge_Vector *vec) |
Performs The scalar multiplication operation for a vector. More... | |
void | BgeVectorSubtraction (Bge_Vector *vec_1, Bge_Vector *vec_2, Bge_Vector *output_vec) |
Performs the vector subtraction operation. More... | |
Defines a data structure that represents a vector with values of type double, as well as defining some vector operations.
Bge_Vector* BgeVectorCreate | ( | int | capacity | ) |
Creates a vector with a given capacity.
capacity | The maximum capacity of the vector. |
References Bge_Vector::capacity, and Bge_Vector::items.
Referenced by SetPosteriorParametricMatrix(), and SetSampleVariance().
void BgeVectorDelete | ( | Bge_Vector ** | vec | ) |
Deallocates the memory associated with a vector.
vec | The vector to free. |
Referenced by SetPosteriorParametricMatrix(), and SetSampleVariance().
double BgeVectorDotProduct | ( | Bge_Vector * | vec_1, |
Bge_Vector * | vec_2 | ||
) |
Computes the dot product between two vectors.
vec_1 | first input vector |
vec_2 | second input vector |
References Bge_Vector::capacity, and Bge_Vector::items.
void BgeVectorScalarMultiplication | ( | double | scalar, |
Bge_Vector * | vec | ||
) |
Performs The scalar multiplication operation for a vector.
scalar | That the vector is multiplied by |
vec | The input/output vector that is multiplied by the scalar |
References Bge_Vector::capacity, and Bge_Vector::items.
void BgeVectorSubtraction | ( | Bge_Vector * | vec_1, |
Bge_Vector * | vec_2, | ||
Bge_Vector * | output_vec | ||
) |
Performs the vector subtraction operation.
vec_1 | Input vector that has is being subtracted from |
vec_2 | Input vector that is subtracted |
output_vec | The result of the subtraction |
References Bge_Vector::capacity, and Bge_Vector::items.
Referenced by SetSampleVariance().