#include #include #include "gematrix.h" template T init_value(Index i, Index j, Index m, Index n) { return T(j)*T(n) + T(i) + T(1); } void print_value(double value) { std::printf(" %4.1lf", value); } template void print_matrix(const Matrix& A) { for (std::size_t i = 0; i < A.m; ++i) { std::printf(" "); for (std::size_t j = 0; j < A.n; ++j) { print_value(A(i, j)); } std::printf("\n"); } } int main() { using namespace matvec; GeMatrix A(3, 7, StorageOrder::ColMajor); initGeMatrix(A, init_value); printf("A:\n"); print_matrix(A); }