Tutorial_BlockOperations_print_block.cpp File Reference
#include <Eigen/Dense>
#include <iostream>

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )
6  {
7  Eigen::MatrixXf m(4, 4);
8  m << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16;
9  cout << "Block in the middle" << endl;
10  cout << m.block<2, 2>(1, 1) << endl << endl;
11  for (int i = 1; i <= 3; ++i) {
12  cout << "Block of size " << i << "x" << i << endl;
13  cout << m.block(0, 0, i, i) << endl << endl;
14  }
15  int j1 = 2;
16  int j2 = 3;
17  cout << "Non-square block of size " << j1 << "x" << j2 << endl;
18  cout << m.block(0, 0, j1, j2) << endl << endl;
19 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
int * m
Definition: level2_cplx_impl.h:294

References i, and m.