21 #include <tensor/tensor.h>
22 #include <tensor/linalg.h>
23 #include <tensor/io.h>
44 assert(Aunorm.
rank() == 2);
48 double val = log2(matrix_norminf(Aunorm));
49 int e = (int)floor(val);
50 size_t j = std::max((
int)0, (
int)(e+1));
59 for (
size_t k = 2; k <= order; k++) {
60 c = (c * (order-k+1)) / (k*(2*order-k+1));
71 for (
size_t k = 1; k <= j; k++) {
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.
Real Tensor with elements of type "double".
const RTensor solve(const RTensor &A, const RTensor &B)
Solve a real linear system of equations by Gauss-Seidel method.