Tutorial_BlockOperations_block_assignment.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 4 of file Tutorial_BlockOperations_block_assignment.cpp.

5 {
7  m << 1,2,
8  3,4;
10  std::cout << "Here is the array a:\n" << a << "\n\n";
11  a.block<2,2>(1,1) = m;
12  std::cout << "Here is now a with m copied into its central 2x2 block:\n" << a << "\n\n";
13  a.block(0,0,2,3) = a.block(2,1,2,3);
14  std::cout << "Here is now a with bottom-right 2x3 block copied into top-left 2x3 block:\n" << a << "\n\n";
15 }
Matrix3f m
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:49
static const ConstantReturnType Constant(Index rows, Index cols, const Scalar &value)