* Extend a bit ParametrizedLine and move it to a separate file,

add unit-tests for it.
* remove "using namespace std" in test/main.h such that the compilation
  bug found today in SVD won't happen again.
This commit is contained in:
Gael Guennebaud
2008-09-03 22:35:45 +00:00
parent c29c7b0ea9
commit 52406aecad
8 changed files with 206 additions and 78 deletions

View File

@@ -2,6 +2,7 @@
// for linear algebra. Eigen itself is part of the KDE project.
//
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
// Copyright (C) 2008 Benoit Jacob <jacob@math.jussieu.fr>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -53,7 +54,6 @@ template<typename HyperplaneType> void hyperplane(const HyperplaneType& _plane)
Scalar s0 = ei_random<Scalar>();
Scalar s1 = ei_random<Scalar>();
VERIFY_IS_APPROX( n1.dot(n1), Scalar(1) );
VERIFY_IS_APPROX( n1.dot(n1), Scalar(1) );
VERIFY_IS_MUCH_SMALLER_THAN( pl0.absDistance(p0), Scalar(1) );
@@ -96,6 +96,9 @@ template<typename Scalar> void lines()
Vector u = Vector::Random();
Vector v = Vector::Random();
Scalar a = ei_random<Scalar>();
while (ei_abs(a-1) < 1e-4) a = ei_random<Scalar>();
while (u.norm() < 1e-4) u = Vector::Random();
while (v.norm() < 1e-4) v = Vector::Random();
HLine line_u = HLine::Through(center + u, center + a*u);
HLine line_v = HLine::Through(center + v, center + a*v);