21 #include <tensor/tensor.h>
22 #include <tensor/linalg.h>
42 assert(Aunorm.
rank() == 2);
46 double val = log2(matrix_norminf(Aunorm));
47 int e = (int)floor(val);
48 size_t j = std::max(0, e+1);
57 for (
size_t k = 2; k <= order; k++) {
58 c = c * (order-k+1) / (k*(2*order-k+1));
59 X = fold(A, -1, X, 0);
69 for (
size_t k = 1; k <= j; k++) {
70 X = fold(X, -1, X, 0);
int rank() const
Number of Tensor indices.
index columns() const
Query the size of 2nd index.
static const Tensor< elt_t > eye(index rows)
Identity matrix.
index rows() const
Query then size of 1st index.
const RTensor expm(const RTensor &A, unsigned int order=7)
Compute the exponential of a real matrix.
Complex Tensor with elements of type "cdouble".
const RTensor solve(const RTensor &A, const RTensor &B)
Solve a real linear system of equations by Gauss-Seidel method.