class_FixedBlock.cpp File Reference

Go to the source code of this file.

Functions

int main (int, char **)
 
template<typename Derived >
const Eigen::Block< const Derived, 2, 2 > topLeft2x2Corner (const Eigen::MatrixBase< Derived > &m)
 
template<typename Derived >
Eigen::Block< Derived, 2, 2 > topLeft2x2Corner (Eigen::MatrixBase< Derived > &m)
 

Function Documentation

◆ main()

int main ( int  ,
char **   
)

Definition at line 18 of file class_FixedBlock.cpp.

19 {
21  std::cout << topLeft2x2Corner(4*m) << std::endl; // calls the const version
22  topLeft2x2Corner(m) *= 2; // calls the non-const version
23  std::cout << "Now the matrix m is:" << std::endl << m << std::endl;
24  return 0;
25 }
Matrix3f m
static const IdentityReturnType Identity()
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:182
Eigen::Block< Derived, 2, 2 > topLeft2x2Corner(Eigen::MatrixBase< Derived > &m)

◆ topLeft2x2Corner() [1/2]

template<typename Derived >
const Eigen::Block<const Derived, 2, 2> topLeft2x2Corner ( const Eigen::MatrixBase< Derived > &  m)

Definition at line 13 of file class_FixedBlock.cpp.

14 {
15  return Eigen::Block<const Derived, 2, 2>(m.derived(), 0, 0);
16 }
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:107

◆ topLeft2x2Corner() [2/2]

template<typename Derived >
Eigen::Block<Derived, 2, 2> topLeft2x2Corner ( Eigen::MatrixBase< Derived > &  m)

Definition at line 6 of file class_FixedBlock.cpp.

7 {
8  return Eigen::Block<Derived, 2, 2>(m.derived(), 0, 0);
9 }