File numerics/src/tools/JordanAlgebra.h¶
Go to the source code of this file
Functions of the Jordan algebra.
Functions
-
NumericsMatrix *Arrow_repr(const double *const vec, const unsigned int vecSize, const size_t varsCount)¶
Create the Arrow representation matrix from vector.
- Parameters
vec – pointer to the vector data.
vecSize – the length of the vector.
varsCount – the count of variables (subvectors) in vec.
- Returns
a pointer to a NumericsMatrix
-
NumericsMatrix *Reflect_mat(const unsigned int size, NM_types type)¶
Returns reflection matrix.
|1 0 ... 0| R = |0 -1 ... 0| | ........ 0| |0 0 ... -1|
- Parameters
size – is the size of rectangular metrix
- Returns
reflection matrix.
-
NumericsMatrix *Quad_repr(const double *const vec, const unsigned int vecSize, const size_t varsCount)¶
Returns quadratic representation of the vector x by formula 2*xx^T - det(x)R.
- Parameters
vec – pointer to the vector data.
vecSize – the length of the vector.
varsCount – the count of variables (subvectors) in vec.
- Returns
a pointer to a NumericsMatrix
-
void NesterovToddVector(const double *const vec1, const double *const vec2, const unsigned int vecSize, const size_t varsCount, double *out)¶
-
double *JA_iden(const unsigned int vecSize, const size_t varsCount)¶
Create the Arrow representation matrix from vector.
- Parameters
vecSize – the length of the vector.
varsCount – the count of variables (subvectors) in vec.
- Returns
a pointer to the identity element of the Jordan algebra
-
void JA_prod(const double *const vec1, const double *const vec2, const unsigned int vecSize, const int varsCount, double *out)¶
Jordan product of two vectors.
- Parameters
vec1 – is a vector;
vec2 – is a vector;
vecSize – is the length of the vectors;
varsCount – is the count of variables (subvectors) in x and y.
out – is the result vector of the Jordan product.
-
void JA_eigenvals(const double *const vec, const unsigned int vecSize, const size_t varsCount, double *out)¶
Returns the eigenvalues of each element in the vector.
- Parameters
vec – is the pointer to the vector data.
vecSize – is the length of the vector.
varsCount – is the count of variables (subvectors) in vec.
out – is the result vector of eigenvalues (out\in\mathbb{R}^{2*varsCount})..
-
void JA_eigenvecs(const double *const vec, const unsigned int vecSize, const size_t varsCount, double **out)¶
Returns the eigenvectors of each element in the vector.
- Parameters
vec – is the pointer to the vector data.
vecSize – is the length of the vector.
varsCount – is the count of variables (subvectors) in vec.
out – is the result matrix of eigenvactors (out\in\mathbb{R}^{vecSize\times 2*varsCount}).
-
void JA_sqrt(const double *const vec, const unsigned int vecSize, const size_t varsCount, double *out)¶
Compute element by element square root.
- Parameters
vec – is the vector
vecSize – is the size of the vector vec
varsCount – is the count of variables (subvectors) in vec.
out – is the sqrt vector
-
void JA_sqrt_inv(const double *const vec, const unsigned int vecSize, const size_t varsCount, double *out)¶
Compute element by element inverse of square root.
- Parameters
vec – is the vector
vecSize – is the size of the vector vec
varsCount – is the count of variables (subvectors) in vec.
out – is the inverse of sqrt vector
-
void JA_power2(const double *const vec, const unsigned int vecSize, const size_t varsCount, double *out)¶
Compute element by element the square of the vector.
- Parameters
vec – is the vector
vecSize – is the size of the vector vec
varsCount – is the count of variables (subvectors) in vec.
out – is the square of the vector
-
void JA_inv(const double *const vec, const unsigned int vecSize, const size_t varsCount, double *out)¶
Compute element by element the inverse of the vector.
- Parameters
vec – is the vector
vecSize – is the size of the vector vec
varsCount – is the count of variables (subvectors) in vec.
out – is the inverse of the vector
-
void JA_det(const double *const vec, const unsigned int vecSize, const size_t varsCount, double *out)¶
Compute element by element square root.
- Parameters
vec – is the vector
vecSize – is the size of the vector vec
varsCount – is the count of variables (subvectors) in vec.
out – is the vector of determinants