37 namespace blasWrapper {
42 double one_norm(
const double*
const _x,
const size_t _n);
45 double two_norm(
const double*
const _x,
const size_t _n);
48 double dot_product(
const double*
const _x,
const size_t _n,
const double*
const _y);
54 void matrix_vector_product(
double*
const _x,
const size_t _m,
const double _alpha,
const double*
const _A,
const size_t _n,
const bool _transposed,
const double*
const _y);
57 void dyadic_vector_product(
double* _A,
const size_t _m,
const size_t _n,
const double _alpha,
const double*
const _x,
const double*
const _y);
62 const size_t _leftDim,
63 const size_t _rightDim,
65 const double*
const _A,
67 const bool _transposeA,
68 const size_t _middleDim,
69 const double*
const _B,
71 const bool _transposeB);
75 const size_t _leftDim,
76 const size_t _rightDim,
78 const double*
const _A,
79 const bool _transposeA,
80 const size_t _middleDim,
81 const double*
const _B,
82 const bool _transposeB) {
84 matrix_matrix_product( _C, _leftDim, _rightDim, _alpha, _A, _transposeA ? _leftDim : _middleDim, _transposeA, _middleDim, _B, _transposeB ? _middleDim : _rightDim, _transposeB);
90 void svd(
double*
const _U,
double*
const _S,
double*
const _Vt,
const double*
const _A,
const size_t _m,
const size_t _n);
93 void svd_destructive(
double*
const _U,
double*
const _S,
double*
const _Vt,
double*
const _A,
const size_t _m,
const size_t _n);
97 std::tuple<std::unique_ptr<double[]>, std::unique_ptr<double[]>,
size_t>
qc(
const double*
const _A,
const size_t _m,
const size_t _n);
100 std::tuple<std::unique_ptr<double[]>, std::unique_ptr<double[]>,
size_t>
qc_destructive(
double*
const _A,
const size_t _m,
const size_t _n);
104 std::tuple<std::unique_ptr<double[]>, std::unique_ptr<double[]>,
size_t>
cq(
const double*
const _A,
const size_t _m,
const size_t _n);
107 std::tuple<std::unique_ptr<double[]>, std::unique_ptr<double[]>,
size_t>
cq_destructive(
double*
const _A,
const size_t _m,
const size_t _n);
111 void qr(
double*
const _Q,
double*
const _R,
const double*
const _A,
const size_t _m,
const size_t _n);
114 void inplace_qr(
double*
const _AtoQ,
double*
const _R,
const size_t _m,
const size_t _n);
117 void qr_destructive(
double*
const _Q,
double*
const _R,
double*
const _A,
const size_t _m,
const size_t _n);
122 void rq(
double*
const _R,
double*
const _Q,
const double*
const _A,
const size_t _m,
const size_t _n);
125 void inplace_rq(
double*
const _R,
double*
const _AtoQ,
const size_t _m,
const size_t _n);
128 void rq_destructive(
double*
const _R,
double*
const _Q,
double*
const _A,
const size_t _m,
const size_t _n);
132 void solve(
double* _x,
const double* _A,
size_t _m,
size_t _n,
const double*
_b,
size_t _p);
137 void solve_least_squares(
double*
const _x,
const double*
const _A,
const size_t _m,
const size_t _n,
const double*
const _b,
const size_t _p);
145 void inverse(
double*
const _B,
const double*
const _A,
const size_t _m,
const size_t _n);
std::tuple< std::unique_ptr< double[]>, std::unique_ptr< double[]>, size_t > cq(const double *const _A, const size_t _m, const size_t _n)
: splits A = C*Q, with _C an rxm matrix (where r is the rank of _A) and _Q orthogonal.
std::tuple< std::unique_ptr< double[]>, std::unique_ptr< double[]>, size_t > qc(const double *const _A, const size_t _m, const size_t _n)
: splits A = Q*C, with _C an rxn matrix (where r is the rank of _A) and _Q orthogonal.
void qr(double *const _Q, double *const _R, const double *const _A, const size_t _m, const size_t _n)
: Performs (Q,R) = QR(A)
void matrix_matrix_product(double *const _C, const size_t _leftDim, const size_t _rightDim, const double _alpha, const double *const _A, const size_t _lda, const bool _transposeA, const size_t _middleDim, const double *const _B, const size_t _ldb, const bool _transposeB)
: Performs the Matrix-Matrix product C = alpha*OP(A) * OP(B)
void inplace_rq(double *const _R, double *const _AtoQ, const size_t _m, const size_t _n)
: Performs (R,AtoQ) = RQ(AtoQ)
The main namespace of xerus.
void inplace_qr(double *const _AtoQ, double *const _R, const size_t _m, const size_t _n)
: Performs (AtoQ,R) = QR(AtoQ)
void svd_destructive(double *const _U, double *const _S, double *const _Vt, double *const _A, const size_t _m, const size_t _n)
: Performs (U,S,V) = SVD(A). Destroys A.
void rq(double *const _R, double *const _Q, const double *const _A, const size_t _m, const size_t _n)
: Performs (R,Q) = RQ(A)
double dot_product(const double *const _x, const size_t _n, const double *const _y)
: Computes the dot product = x^T*y
double one_norm(const double *const _x, const size_t _n)
: Computes the one norm =||x||_1
void dyadic_vector_product(double *_A, const size_t _m, const size_t _n, const double _alpha, const double *const _x, const double *const _y)
: Performs A = alpha*x*y^T
std::tuple< std::unique_ptr< double[]>, std::unique_ptr< double[]>, size_t > qc_destructive(double *const _A, const size_t _m, const size_t _n)
: splits A = Q*C, with _C an rxn matrix (where r is the rank of _A) and _Q orthogonal. Destroys A.
void solve(double *_x, const double *_A, size_t _m, size_t _n, const double *_b, size_t _p)
: Solves Ax = b for x
double two_norm(const double *const _x, const size_t _n)
: Computes the two norm =||x||_2
void qr_destructive(double *const _Q, double *const _R, double *const _A, const size_t _m, const size_t _n)
: Performs (Q,R) = QR(A), destroys A in the process
void svd(double *const _U, double *const _S, double *const _Vt, const double *const _A, const size_t _m, const size_t _n)
: Performs (U,S,V) = SVD(A)
void inverse(double *const _B, const double *const _A, const size_t _m, const size_t _n)
: Performs B = A^-1
void matrix_vector_product(double *const _x, const size_t _m, const double _alpha, const double *const _A, const size_t _n, const bool _transposed, const double *const _y)
: Perfroms x = alpha*OP(A)*y
void rq_destructive(double *const _R, double *const _Q, double *const _A, const size_t _m, const size_t _n)
: Performs (R,Q) = RQ(A), destroys A in the process
void solve_least_squares_destructive(double *const _x, double *const _A, const size_t _m, const size_t _n, double *const _b, const size_t _p)
: Solves min ||Ax - b||_2 for x
#define XERUS_force_inline
Collection of attributes to force gcc to inline a specific function.
std::tuple< std::unique_ptr< double[]>, std::unique_ptr< double[]>, size_t > cq_destructive(double *const _A, const size_t _m, const size_t _n)
: splits A = C*Q, with _C an rxm matrix (where r is the rank of _A) and _Q orthogonal. Destroys A.
Header file for global shorthand notations of elementary integer types and attribute lists...
void solve_least_squares(double *const _x, const double *const _A, const size_t _m, const size_t _n, const double *const _b, const size_t _p)
: Solves min ||Ax - b||_2 for x