TemplateKeyword_simple.cpp File Reference

Go to the source code of this file.

Functions

void copyUpperTriangularPart (MatrixXf &dst, const MatrixXf &src)
 
int main ()
 

Function Documentation

◆ copyUpperTriangularPart()

void copyUpperTriangularPart ( MatrixXf &  dst,
const MatrixXf &  src 
)

Definition at line 6 of file TemplateKeyword_simple.cpp.

7 {
8  dst.triangularView<Eigen::Upper>() = src.triangularView<Eigen::Upper>();
9 }
@ Upper
Definition: Constants.h:213

◆ main()

int main ( )

Definition at line 11 of file TemplateKeyword_simple.cpp.

12 {
13  MatrixXf m1 = MatrixXf::Ones(4,4);
14  MatrixXf m2 = MatrixXf::Random(4,4);
15  std::cout << "m2 before copy:" << std::endl;
16  std::cout << m2 << std::endl << std::endl;
18  std::cout << "m2 after copy:" << std::endl;
19  std::cout << m2 << std::endl << std::endl;
20 }
Matrix3d m1
Definition: IOFormat.cpp:2
void copyUpperTriangularPart(MatrixXf &dst, const MatrixXf &src)
MatrixType m2(n_dims)
Matrix< float, Dynamic, Dynamic > MatrixXf
Dynamic×Dynamic matrix of type float.
Definition: Matrix.h:501