Lines Matching defs:lpNorm
150 template<typename VectorType> void lpNorm(const VectorType& v)
158 VERIFY_IS_APPROX(u.template lpNorm<Infinity>(), RealScalar(0));
159 VERIFY_IS_APPROX(u.template lpNorm<1>(), RealScalar(0));
160 VERIFY_IS_APPROX(u.template lpNorm<2>(), RealScalar(0));
161 VERIFY_IS_APPROX(u.template lpNorm<5>(), RealScalar(0));
165 VERIFY_IS_APPROX(u.template lpNorm<Infinity>(), u.cwiseAbs().maxCoeff());
168 VERIFY_IS_APPROX(u.template lpNorm<1>(), u.cwiseAbs().sum());
169 VERIFY_IS_APPROX(u.template lpNorm<2>(), sqrt(u.array().abs().square().sum()));
170 VERIFY_IS_APPROX(numext::pow(u.template lpNorm<5>(), typename VectorType::RealScalar(5)), u.array().abs().pow(5).sum());
269 CALL_SUBTEST_1( lpNorm(Matrix<float, 1, 1>()) );
270 CALL_SUBTEST_2( lpNorm(Vector2f()) );
271 CALL_SUBTEST_7( lpNorm(Vector3d()) );
272 CALL_SUBTEST_8( lpNorm(Vector4f()) );
273 CALL_SUBTEST_5( lpNorm(VectorXf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
274 CALL_SUBTEST_4( lpNorm(VectorXcf(internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
276 CALL_SUBTEST_5( lpNorm(VectorXf(0)) );
277 CALL_SUBTEST_4( lpNorm(VectorXcf(0)) );