Commit Graph

164 Commits

Author SHA1 Message Date
Benoit Jacob
aa966ca319 fix bug #187: stable norm test was quite broken 2011-02-18 09:46:49 -05:00
Benoit Jacob
13a5582835 undo debugging change 2011-02-16 09:18:48 -05:00
Benoit Jacob
59596efdf7 Fix bug #89: on GCC <= 4.3, use a custom assert implementation to work around a compiler bug 2011-02-16 08:50:19 -05:00
Hauke Heibel
83e3c4582f Improved the array unit test - internal::isApprox needs to use the same precision as VERIFY_IS_NOT_APPROX.
Removed debug code from test_isApprox.
2010-12-16 18:53:02 +01:00
Jitse Niesen
9bad7c7edb Compilation fix in case EIGEN_DEBUG_ASSERTS is defined. 2010-11-26 14:21:57 +00:00
Benoit Jacob
006c9a5105 implement VERIFY in a function so it doesn't get compiled thousands of times. 2010-10-29 10:27:20 -04:00
Benoit Jacob
7d441260db on test failure, abort instead of exit, so we can get a stack trace 2010-10-29 10:07:30 -04:00
Benoit Jacob
4716040703 bug #86 : use internal:: namespace instead of ei_ prefix 2010-10-25 10:15:22 -04:00
Hauke Heibel
55c7848877 Matrix product refactoring (rhs products only).
Added strong inlines required for MSVC for proper inlining.
Added specializations for DiagonalMatrix products to RotationBase.
Added left- and righ-hand-side products with DiagonalMatrix to Transform.
RHS Transform products now return Matrix objects only.
Split the geo_transformations unit test. Some tests were not made for projectivities.
Removed unused variables from main.h that caused warnings.
2010-08-19 19:25:35 +02:00
Hauke Heibel
85fdcdf055 Fixed Geometry module failures.
Removed default parameter from Transform.
Removed the TransformXX typedefs.
Removed references to TransformXX from unit tests and docs.
Assigning Transforms to a sub-group is now forbidden at compile time.
Products should now properly support the Isometry flag.
Fixed alignment checks in MapBase.
2010-08-17 20:03:50 +02:00
Gael Guennebaud
7020f30da3 sync with default branch 2010-07-22 16:29:35 +02:00
Gael Guennebaud
7b23fad4c9 report a true assert when not checking for an assertion 2010-07-20 12:54:53 +02:00
Gael Guennebaud
d4d4382b18 use dummy_precision by default instead of 0 2010-07-14 22:50:03 +02:00
Gael Guennebaud
28e64b0da3 email change 2010-06-24 23:21:58 +02:00
Hauke Heibel
546b802b77 Still fixing warnings. 2010-06-20 20:16:45 +02:00
Hauke Heibel
f1679c7185 Utilize Index in all unit tests. 2010-06-20 17:37:56 +02:00
Hauke Heibel
2a64fa4947 Eigen types must always be passed by reference in order to retain memory alignment. 2010-06-08 13:49:40 +02:00
Benoit Jacob
faa3ff3be6 tests:
* change test_is_equal so it just checks for equality, doesn't try anymore to allow to ignoring the difference between col and row vectors.
   (needed for the upcoming Index types change)
 * in ei_assert, don't report on cerr if we're inside of VERIFY_RAISES_ASSERT
2010-05-30 16:00:09 -04:00
Thomas Capricelli
00a3d07795 display actual/expected warning if ei_isApprox() fails 2010-05-21 02:13:50 +02:00
Benoit Jacob
e277586958 Complete rework of global math functions and NumTraits.
* Now completely generic so all standard integer types (like char...) are supported.
** add unit test for that (integer_types).
* NumTraits does no longer inherit numeric_limits
* All math functions are now templated
* Better guard (static asserts) against using certain math functions on integer types.
2010-04-28 18:51:38 -04:00
Benoit Jacob
9962c59b56 * implement the corner() API change: new methods topLeftCorner() etc
* get rid of BlockReturnType: it was not needed, and code was not always using it consistently anyway
* add topRows(), leftCols(), bottomRows(), rightCols()
* add corners unit-test covering all of that
* adapt docs, expand "porting from eigen 2 to 3"
* adapt Eigen2Support
2010-04-22 14:11:18 -04:00
Benoit Jacob
34b14c48f3 shut up stupid gcc 4.5.0 warning 2010-04-18 22:14:03 -04:00
Mark Borgerding
101cc03176 merge 2010-03-07 23:46:26 -05:00
Thomas Capricelli
e0830cb1b7 Use a specialization of test_is_equal() instead of defining COMPARE() 2010-02-27 17:56:22 +01:00
Thomas Capricelli
15a33622ac * define COMPARE(,), which prints expected/actual results in case of failure
* use it in test/NonLinearOptimization.cpp
2010-02-27 16:30:15 +01:00
Benoit Jacob
32115bff1e * add VERIFY_IS_EQUAL, should compile faster and it's natural when no arithmetic is involved.
* rename 'submatrices' test to 'block'
* add block-inside-of-block tests
* remove old cruft
* split diagonal() tests into separate file
2010-02-26 09:03:13 -05:00
Benoit Jacob
d92df336ad Further LU test improvements. I'm not aware of any test failures anymore, not even with huge numbers of repetitions.
Finally the createRandomMatrixOfRank() function is renamed to createRandomPIMatrixOfRank, where PI stands for 'partial isometry', that is, a matrix whose singular values are 0 or 1.
2010-02-23 15:40:24 -05:00
Benoit Jacob
7dc75380c1 * FullPivLU: replace "remaining==0" termination condition (from Golub) by a fuzzy compare
(fixes lu test failures when testing solve())
* LU test: set appropriate threshold and limit the number of times that a specially tricky test
  is run. (fixes lu test failures when testing rank()).
* Tests: rename createRandomMatrixOfRank to createRandomProjectionOfRank
2010-02-23 09:04:59 -05:00
Jitse Niesen
dbf3af866e Remove some Array #includes. 2010-01-21 12:31:03 +00:00
Benoit Jacob
d2e44f2636 * 4x4 inverse: revert to cofactors method
* inverse tests: use createRandomMatrixOfRank, use more strict precision
* tests: createRandomMatrixOfRank: support 1x1 matrices
* determinant: nest the xpr
* Minor: add comment
2009-12-09 12:43:25 -05:00
Benoit Jacob
de25059502 * Remove test_ prefix in tests
* tests now honor EIGEN_REPEAT and EIGEN_SEED if no arguments were passed
2009-12-02 12:07:47 -05:00
Benoit Jacob
3e73f6036c * HouseholderSequence:
* be aware of number of actual householder vectors
    (optimization in non-full-rank case, no behavior change)
  * fix applyThisOnTheRight, it was using k instead of actual_k
* QR: rename matrixQ() to householderQ() where applicable
2009-12-02 11:11:09 -05:00
Mark Borgerding
8fce0b5459 added newline at the end of file to quiet gcc warning 2009-12-01 17:37:33 -05:00
Benoit Jacob
44d0d667cd 4x4 inverse:
* change block selection threshold from 1e-2 to 1e-1
* add rigorous precision test
2009-11-23 10:13:21 -05:00
Benoit Jacob
2840ac7e94 big huge changes, so i dont remember everything.
* renaming, e.g. LU ---> FullPivLU
* split tests framework: more robust, e.g. dont generate empty tests if a number is skipped
* make all remaining tests use that splitting, as needed.
* Fix 4x4 inversion (see stable branch)
* Transform::inverse() and geo_transform test : adapt to new inverse() API, it was also trying to instantiate inverse() for 3x4 matrices.
* CMakeLists: more robust regexp to parse the version number
* misc fixes in unit tests
2009-10-28 18:19:29 -04:00
Benoit Jacob
6c1b91678b kill ei_add_test_multi. Now the macro ei_add_test does all that automatically, by parsing the source file. No risk anymore to specify the wrong number of tests! Also, introduce CALL_SUBTESTX for X=1..10 that allows to port existing code much quicker. And port already the product* and eigensolver* files. 2009-10-19 14:40:35 -04:00
Benoit Jacob
67bf7c90c5 * update test to expose bug #57
* update createRandomMatrixOfRank to support fixed size
2009-09-28 09:40:18 -04:00
Gael Guennebaud
4a6e5694d6 disable warning 279: controlling expression is constant for ICC 2009-09-15 13:03:24 +02:00
Hauke Heibel
59f5bce41c fix issue #49 2009-09-01 23:15:30 +02:00
Benoit Jacob
5339db6164 add VERIFY_IS_UNITARY 2009-08-31 22:08:43 -04:00
Benoit Jacob
a848ed02ad let createRandomMatrixOfRank support fixed-size! 2009-08-23 17:33:31 -04:00
Benoit Jacob
c7ae261ac0 adapt to API changes 2009-08-20 01:29:38 -04:00
Gael Guennebaud
846e8b49ba fix compilation of unit tests 2009-08-15 10:18:05 +02:00
Gael Guennebaud
1e7b1a8a85 add a SparseNestByValue expression and fix issue in sparse adjoint evaluation 2009-07-13 14:55:03 +02:00
Benoit Jacob
e093b43b2c * rename QR to HouseholderQR because really that impacts the API, not just the impl.
* rename qr() to householderQr(), for same reason.
* clarify that it's non-pivoting, non-rank-revealing, so remove all the rank API, make solve() be void instead of bool, update the docs/test, etc.
* fix warning in SVD
2009-07-06 17:12:10 +02:00
Benoit Jacob
6347b1db5b remove sentence "Eigen itself is part of the KDE project."
it never made very precise sense. but now does it still make any?
2009-05-22 20:25:33 +02:00
Jitse Niesen
e3d64cb418 Fix compilation error in createRandomMatrixOfRank() 2009-05-17 21:17:45 +01:00
Hauke Heibel
6358c12998 * introduced method createRandomMatrixOfRank (R = U*D*V where U,V unitary, D r-by-c diag. with rank non-zero values)
* switched lu/qr tests to be using createRandomMatrixOfRank
* removed unused methods doSomeRankPreservingOperations
* removed NOTE about doSomeRankPreservingOperations
2009-05-17 16:07:12 +02:00
Keir Mierle
b9a82be727 Add full pivoting to LDLT decomposition. 2009-02-03 17:50:35 +00:00
Gael Guennebaud
4ac8cabf8a fix my previous commit with EIGEN_EMPTY macro bug 2009-01-27 19:08:20 +00:00
Benoit Jacob
fabaa6915b * fix in IO.h, a useless copy was made because of assignment from
Derived to MatrixBase.
* the optimization of eval() for Matrix now consists in a partial
  specialization of ei_eval, which returns a reference type for Matrix.
  No overriding of eval() in Matrix anymore. Consequence: careful,
  ei_eval is no longer guaranteed to give a plain matrix type!
  For that, use ei_plain_matrix_type, or the PlainMatrixType typedef.
* so lots of changes to adapt to that everywhere. Hope this doesn't
  break (too much) MSVC compilation.
* add code examples for the new image() stuff.
* lower a bit the precision for floats in the unit tests as
  we were already doing some workarounds in inverse.cpp and we got some
  failed tests.
2008-12-18 20:36:25 +00:00
Gael Guennebaud
93f8d56789 improved MSVC support in cmake files (SSE) 2008-12-18 09:07:36 +00:00
Gael Guennebaud
6e138d0069 more MSVC cmake fixes 2008-12-17 18:37:04 +00:00
Gael Guennebaud
4cb63808d4 some cmake fixes for windows and GSL 2008-12-17 17:50:43 +00:00
Benoit Jacob
38b83b4157 * throw bad_alloc if exceptions are enabled, after patch by Kenneth Riddile
* disable vectorization on MSVC 2005, as it doesn't have all the required intrinsics. require 2008.
2008-12-16 15:17:29 +00:00
Benoit Jacob
069ecbb4ab * complete the change norm2->squaredNorm in PartialRedux
* somehow the NICE_RANDOM stuff wasn't being used anymore and
  tests were sometimes failing again. Fixed by #including Eigen/Array
  instead of cherry-picking just Random.h.
* little fixes in the unaligned assert page
2008-12-07 21:40:53 +00:00
Benoit Jacob
00f89a8f37 Update e-mail address 2008-11-24 13:40:43 +00:00
Gael Guennebaud
ec0a423862 Add isApprox in Geometry module's classes.
Complete unit tests wrt previous commits.
2008-10-25 23:10:21 +00:00
Gael Guennebaud
db030d4e28 * fix issues with "long double" type (useful to enforce the use of x87 registers)
* extend the documentation on "extending Eigen"
2008-09-14 11:59:10 +00:00
Gael Guennebaud
52406aecad * 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.
2008-09-03 22:35:45 +00:00
Benoit Jacob
46fe7a3d9e if EIGEN_NICE_RANDOM is defined, the random functions will return numbers with
few bits left of the comma and for floating-point types will never return zero.
This replaces the custom functions in test/main.h, so one does not anymore need
to think about that when writing tests.
2008-09-01 17:31:21 +00:00
Gael Guennebaud
7e8aa63bb7 * Add Hyperplane::transform(Matrix/Transform)
* Fix compilations with gcc 3.4, ICC and doxygen
* Fix krazy directives (hopefully)
2008-08-31 13:32:29 +00:00
Gael Guennebaud
f0394edfa7 * bugfix in SolveTriangular found by Timothy Hunter (did not compiled for very small fixed size matrices)
* bugfix in Dot unroller
* added special random generator for the unit tests and reduced the tolerance threshold by an order of magnitude
  this fixes issues with sum.cpp but other tests still failed sometimes, this have to be carefully checked...
2008-08-22 17:48:36 +00:00
Benoit Jacob
17ec407ccd * add Regression module, from eigen1, improved, with doc and unit-test.
* fix .normalized() so that Random().normalized() works; since the return
type became complicated to write down i just let it return an actual
vector, perhaps not optimal.
* add Sparse/CMakeLists.txt. I suppose that it was intentional that it
didn't have CMakeLists, but in <=2.0 releases I'll just manually remove
Sparse.
2008-08-11 02:25:40 +00:00
Gael Guennebaud
a9cf229e15 add a geometry unit test and fix a couple of typo in Quaternion.h 2008-06-03 07:32:12 +00:00
Gael Guennebaud
f2ebbee274 added unit tests for sizeof and dynamic memory allocation 2008-06-02 14:54:52 +00:00
Gael Guennebaud
310f7aa096 moved purely "array" related stuff to a new module Array.
This include:
 - cwise Pow,Sin,Cos,Exp...
 - cwise Greater and other comparison operators
 - .any(), .all() and partial reduction
 - random
2008-05-31 18:11:48 +00:00
Benoit Jacob
b501e08d81 now the unit-tests (hence all of Eigen) don't depend on Qt at all
anymore.
2008-05-29 03:37:16 +00:00
Gael Guennebaud
522e24f2d7 update of the testing framework:
replaced the QTestLib framework my custom macros
and a (optional) custom script to run the tests from ctest.
2008-05-22 12:18:55 +00:00
Benoit Jacob
8c6007f80e * Patch by Konstantinos Margaritis: AltiVec vectorization.
* Fix several warnings, temporarily disable determinant test.
2008-05-03 12:21:23 +00:00
Gael Guennebaud
64bacf1c3f * added ei_sqrt for complex
* updated Cholesky to support complex
* correct result_type for abs and abs2 functors
2008-04-27 14:05:40 +00:00
Gael Guennebaud
4ffffa670e added Cholesky module 2008-04-27 10:57:32 +00:00
Gael Guennebaud
1ec2d21ca5 Fixed a couple of issues introduced in previous commits.
Added a test for Triangular.
2008-04-26 20:28:27 +00:00
Gael Guennebaud
173e582e3c added a tough test to check the determinant that currently fails 2008-04-25 23:13:20 +00:00
Gael Guennebaud
1985fb0551 Added initial experimental support for explicit vectorization.
Currently only the following platform/operations are supported:
 - SSE2 compatible architecture
 - compiler compatible with intel's SSE2 intrinsics
 - float, double and int data types
 - fixed size matrices with a storage major dimension multiple of 4 (or 2 for double)
 - scalar-matrix product, component wise: +,-,*,min,max
 - matrix-matrix product only if the left matrix is vectorizable and column major
   or the right matrix is vectorizable and row major, e.g.:
   a.transpose() * b is not vectorized with the default column major storage.
To use it you must define EIGEN_VECTORIZE and EIGEN_INTEL_PLATFORM.
2008-04-09 12:31:55 +00:00
Benoit Jacob
cff5e3ce9c Make use of the LazyBit, introduce .lazy(), remove lazyProduct. 2008-03-31 16:20:06 +00:00
Benoit Jacob
a994e51c96 * add Gael copyright lines on 2 more files
* macro renaming: EIGEN_NDEBUG becomes EIGEN_NO_DEBUG
  as this is much better (and similar to Qt) and
  EIGEN_CUSTOM_ASSERT becomes EIGEN_USE_CUSTOM_ASSERT
* protect Core header by a EIGEN_CORE_H
2008-03-26 09:13:11 +00:00
Gael Guennebaud
908a0fbab5 small fix of VERIFY_ASSERT in debug mode 2008-03-13 09:51:18 +00:00
Gael Guennebaud
16257d44dd fixed an issue with VERIFY_ASSERT 2008-03-12 18:44:42 +00:00
Gael Guennebaud
35bce20954 Removed Column and Row in favor of Block 2008-03-12 18:10:52 +00:00
Benoit Jacob
2ee68a074e generalized ei_traits<>.
Finally the importing macro is named EIGEN_BASIC_PUBLIC_INTERFACE
because it does not only import the ei_traits, it also makes the base class
a friend, etc.
2008-03-12 17:17:36 +00:00
Benoit Jacob
01572b9f54 big change: MatrixBase only takes one template parameter "Derived", the
template parameter "Scalar" is removed. This is achieved by introducting a
template <typename Derived> struct Scalar to achieve a forward-declaration of
the Scalar typedefs.
2008-03-10 17:23:11 +00:00
Gael Guennebaud
721626dfc5 * Added support for a comma initializer: mat.block(i,j,2,2) << 1, 2, 3, 4;
If the number of coefficients does not match the matrix size, then an assertion is raised.
  No support for xpr on the right side for the moment.

* Added support for assertion checking. This allows to test that an assertion is indeed raised
  when it should be.

* Fixed a mistake in the CwiseUnary example.
2008-03-08 19:02:24 +00:00
Benoit Jacob
a2f8d4be6a Patch by Gael Guennebaud: coeff-wise binary operators.
This unifies + and - and moreover this patch introduces
coeff-wise * and / based on this. Also, corresponding test.
2008-02-29 14:35:14 +00:00
Benoit Jacob
3698d8cf33 Relicense --> dual-license LGPL3+/GPL2+ 2008-02-28 15:44:45 +00:00
Benoit Jacob
6907886a15 prefix global functions with ei_ as previous solution was rather
fragile. also fix compilation with g++ 4.3.
2008-02-28 12:38:12 +00:00
Benoit Jacob
8ba3055447 Ready for alpha2 release.
- complete documentation
- add TODO
- update copyright years
2008-01-07 09:34:21 +00:00
Benoit Jacob
d1d55e67e9 - make MatrixBase and all expressions aware of their preferred traversal order.
Honor this preference in operator=.
- add several methods to the API
- rework API for diagonal matrices
- add benchmarking code
2008-01-05 10:57:14 +00:00
Benoit Jacob
86220784b6 part 2 of the reorganization. Benefits/changes:
1) Eigen2 co-installable with Eigen1 without conflict, without affecting programs including either.
2) #include<Eigen/Core> without the .h without conflict with the Core/ directory
3) Uniformize coding style of the CMakeLists.
2007-12-28 16:20:00 +00:00
Benoit Jacob
dad245af56 - eigen2 now fully enforces constness! found a way to achieve that
with minimal code duplication. There now are only two (2)
  const_cast remaining in the whole source code.
- eigen2 now fully allows copying a row-vector into a column-vector.
  added a unit-test for that.
- split unit tests, improve docs, various improvements.
2007-12-25 17:20:58 +00:00
Benoit Jacob
a52c74095f rename src/ to Eigen/ so that we're able to #include<Eigen/Core.h>
in the examples instead of ugly things like #include"../../src/Core.h"
2007-12-20 21:25:13 +00:00
Benoit Jacob
53040f53d9 add constructors and accessors/mutators specific to small vectors.
Add corresponding unit-test.
2007-12-17 20:51:40 +00:00
Benoit Jacob
7c38475291 -add Ones, DiagonalMatrix, DiagonalCoeffs
-expand and improve unit-tests
-various renaming and improvements
2007-12-15 18:16:30 +00:00
Benoit Jacob
2b20814ced Expand and improve unit-tests 2007-12-11 10:07:18 +00:00
Benoit Jacob
68eba600b1 big reorganisation of asserts, so that:
0) asserts are only done in the public API, except for a few ones explicitly
   named eigen_internal_assert.
1) internal asserts are disabled unless EIGEN_INTERNAL_DEBUGGING is defined.
   This limits the impact of debugging on performance.
2) no 'unused argument' warnings anymore when compiling with -DNDEBUG
2007-12-05 08:56:42 +00:00
Benoit Jacob
04502cccd9 rename Block to DynBlock and rework API to make place for
upcoming fixed-size Block matrix. Also some cleanup.
2007-12-05 07:22:22 +00:00
Benoit Jacob
346c00f4c8 Rework the unit-tests to use lower precision, so as to eliminate
false positives. Also some cleanup in the fuzzy compares.
2007-12-03 10:23:08 +00:00
Benoit Jacob
5abaaf9688 Test application now takes 'seed' and 'repeat' command-line args 2007-12-03 08:35:23 +00:00
Benoit Jacob
e05f29191e Much more convenient, less over-engineered NumTraits. Done during this KDE-Edu weekend. 2007-12-02 18:32:59 +00:00
Benoit Jacob
2fdd067d9e add more unit-tests (covering transpose, conjugate, adjoint, dot product...) 2007-11-28 15:34:40 +00:00