recursator.cpp

来自「矩阵运算源码最新版本」· C++ 代码 · 共 31 行

CPP
31
字号
// File: recursator.cpp#include <iostream>#include <boost/numeric/mtl/mtl.hpp>#include <boost/numeric/mtl/recursion/matrix_recursator.hpp>int main(int argc, char* argv[]){    using namespace mtl; using std::cout;    // Z-order matrix    typedef morton_dense<double, recursion::morton_z_mask>  matrix_type;    matrix_type                                             A(10, 10);    matrix::hessian_setup(A, 3.0);    // Define a recursator over A    matrix_recursator<matrix_type>                          rec(A);    // Access a quadrant of the matrix    cout << "Upper right quadrant (north_east) of A is \n" << *north_east(rec) << "\n";    // Access a quadrant's quadrant of the matrix    cout << "Lower left (south_west) of upper right quadrant (north_east) of A is \n" 	 << *south_west(north_east(rec)) << "\n";    cout << "The virtual bound of 'rec' is " << rec.bound() << "\n";    return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?