blob: 751913700c5e226ede1a26e263f0fd2d5b31db7e [file] [log] [blame]
#include <Eigen/Dense>
#include <iostream>
int main()
{
Eigen::VectorXf v(2);
Eigen::MatrixXf m(2,2), n(2,2);
v << -1,
2;
m << 1,-2,
-3,4;
std::cout << "v.squaredNorm() = " << v.squaredNorm() << std::endl;
std::cout << "v.norm() = " << v.norm() << std::endl;
std::cout << "v.lpNorm<1>() = " << v.lpNorm<1>() << std::endl;
std::cout << "v.lpNorm<Infinity>() = " << v.lpNorm<Eigen::Infinity>() << std::endl;
std::cout << std::endl;
std::cout << "m.squaredNorm() = " << m.squaredNorm() << std::endl;
std::cout << "m.norm() = " << m.norm() << std::endl;
std::cout << "m.lpNorm<1>() = " << m.lpNorm<1>() << std::endl;
std::cout << "m.lpNorm<Infinity>() = " << m.lpNorm<Eigen::Infinity>() << std::endl;
}