Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
gtsam
3rdparty
Eigen
doc
examples
Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp
Go to the documentation of this file.
1
#include <Eigen/Dense>
2
#include <iostream>
3
4
using namespace
std
;
5
using namespace
Eigen
;
6
7
int
main
()
8
{
9
VectorXf
v
(2);
10
MatrixXf
m
(2,2),
n
(2,2);
11
12
v << -1,
13
2;
14
15
m
<< 1,-2,
16
-3,4;
17
18
cout <<
"v.squaredNorm() = "
<< v.squaredNorm() << endl;
19
cout <<
"v.norm() = "
<< v.norm() << endl;
20
cout <<
"v.lpNorm<1>() = "
<< v.lpNorm<1>() << endl;
21
cout <<
"v.lpNorm<Infinity>() = "
<< v.lpNorm<
Infinity
>() << endl;
22
23
cout << endl;
24
cout <<
"m.squaredNorm() = "
<<
m
.squaredNorm() << endl;
25
cout <<
"m.norm() = "
<<
m
.norm() << endl;
26
cout <<
"m.lpNorm<1>() = "
<<
m
.lpNorm<1>() << endl;
27
cout <<
"m.lpNorm<Infinity>() = "
<<
m
.lpNorm<
Infinity
>() << endl;
28
}
m
Matrix3f m
Definition:
AngleAxis_mimic_euler.cpp:1
v
ArrayXcf v
Definition:
Cwise_arg.cpp:1
n
int n
Definition:
BiCGSTAB_simple.cpp:1
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
std
Definition:
Half.h:150
main
int main()
Definition:
Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp:7
Eigen::Infinity
const int Infinity
Definition:
Constants.h:31
gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:19