gtsam
3rdparty
Eigen
doc
examples
TemplateKeyword_flexible.cpp
Go to the documentation of this file.
1
#include <Eigen/Dense>
2
#include <iostream>
3
4
using namespace
Eigen
;
5
6
template
<
typename
Derived1,
typename
Derived2>
7
void
copyUpperTriangularPart
(
MatrixBase<Derived1>
& dst,
const
MatrixBase<Derived2>
& src)
8
{
9
/* Note the 'template' keywords in the following line! */
10
dst.template triangularView<Upper>() = src.template triangularView<Upper>();
11
}
12
13
int
main
()
14
{
15
MatrixXi
m1
= MatrixXi::Ones(5,5);
16
MatrixXi
m2
= MatrixXi::Random(4,4);
17
std::cout <<
"m2 before copy:"
<< std::endl;
18
std::cout <<
m2
<< std::endl << std::endl;
19
copyUpperTriangularPart
(
m2
,
m1
.topLeftCorner(4,4));
20
std::cout <<
"m2 after copy:"
<< std::endl;
21
std::cout <<
m2
<< std::endl << std::endl;
22
}
process_shonan_timing_results.reader
reader
Definition:
process_shonan_timing_results.py:200
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
B
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Definition:
bench_gemm.cpp:49
c
Scalar Scalar * c
Definition:
benchVecAdd.cpp:17
pybind_wrapper_test_script.this
this
Definition:
pybind_wrapper_test_script.py:38
matlab_wrap.required
required
Definition:
matlab_wrap.py:18
m1
Matrix3d m1
Definition:
IOFormat.cpp:2
matlab_wrap.sources
sources
Definition:
matlab_wrap.py:65
mat
MatrixXf mat
Definition:
Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
m2
MatrixType m2(n_dims)
copyUpperTriangularPart
void copyUpperTriangularPart(MatrixBase< Derived1 > &dst, const MatrixBase< Derived2 > &src)
Definition:
TemplateKeyword_flexible.cpp:7
a
ArrayXXi a
Definition:
Array_initializer_list_23_cxx11.cpp:1
main
int main()
Definition:
TemplateKeyword_flexible.cpp:13
Eigen::MatrixBase
Base class for all dense matrices, vectors, and expressions.
Definition:
MatrixBase.h:48
conf.code
code
Definition:
wrap/pybind11/docs/conf.py:73
for
for(size_t i=1;i< poses.size();++i)
Definition:
doc/Code/VisualISAMExample.cpp:7
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:05:22