File numerics/src/tools/JordanAlgebra.h#
Go to the source code of this file
Functions of the Jordan algebra.
Typedefs
-
typedef long double float_type#
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
-
float_type dnrm2l(const unsigned int n, const double *x)#
-
float_type dnrm2sqrl(const unsigned int n, const double *x)#
-
void Qx05y(const double *const x, const double *const y, const unsigned int vecSize, const size_t varsCount, double *out)#
-
void Qx50y(const double *const x, const double *const y, const unsigned int vecSize, const size_t varsCount, double *out)#
-
void Jinv(const double *const x, const unsigned int vecSize, const size_t varsCount, double *out)#
-
void Jsqrt(const double *const x, const unsigned int vecSize, const size_t varsCount, double *out)#
-
void Jsqrtinv(const double *const x, const unsigned int vecSize, const size_t varsCount, double *out)#
-
void Nesterov_Todd_vector(short T, const double *const x, const double *const y, const unsigned int vecSize, const size_t varsCount, double *p)#
-
void Nesterov_Todd_vector_b(const double *const x, const double *const y, const unsigned int vecSize, const size_t varsCount, double *p)#
-
void Qxy(const double *const x, const double *const y, const unsigned int vecSize, const size_t varsCount, double *z)#
-
void QNTpz(const double *const x, const double *const y, const double *const z, const unsigned int vecSize, const size_t varsCount, double *out)#
-
void QNTpinvz(const double *const x, const double *const y, const double *const z, const unsigned int vecSize, const size_t varsCount, double *out)#
-
void QNTpinv2z(const double *const x, const double *const y, const double *const z, const unsigned int vecSize, const size_t varsCount, double *out)#
-
void Jxinvprody(const double *const x, const double *const y, const unsigned int vecSize, const size_t varsCount, double *out)#
-
NumericsMatrix *QRmat(const double *const vec, const unsigned int vecSize, const size_t varsCount)#
-
float_type ld_gammal(const double *const x, const size_t dimension)#
-
NumericsMatrix *NTmat(const double *const x, const double *const z, const unsigned int vecSize, const size_t varsCount)#
-
NumericsMatrix *NTmatinv(const double *const x, const double *const z, const unsigned int vecSize, const size_t varsCount)#
-
NumericsMatrix *NTmatsqr(const double *const x, const double *const z, const unsigned int vecSize, const size_t varsCount)#