Go to the documentation of this file.00001 #include <Eigen/Dense>
00002 #include <iostream>
00003
00004 using namespace std;
00005 using namespace Eigen;
00006
00007 int main()
00008 {
00009 VectorXf v(2);
00010 MatrixXf m(2,2), n(2,2);
00011
00012 v << -1,
00013 2;
00014
00015 m << 1,-2,
00016 -3,4;
00017
00018 cout << "v.squaredNorm() = " << v.squaredNorm() << endl;
00019 cout << "v.norm() = " << v.norm() << endl;
00020 cout << "v.lpNorm<1>() = " << v.lpNorm<1>() << endl;
00021 cout << "v.lpNorm<Infinity>() = " << v.lpNorm<Infinity>() << endl;
00022
00023 cout << endl;
00024 cout << "m.squaredNorm() = " << m.squaredNorm() << endl;
00025 cout << "m.norm() = " << m.norm() << endl;
00026 cout << "m.lpNorm<1>() = " << m.lpNorm<1>() << endl;
00027 cout << "m.lpNorm<Infinity>() = " << m.lpNorm<Infinity>() << endl;
00028 }