Commit Graph

44 Commits

Author SHA1 Message Date
Christoph Hertzberg
da2baf685d Regression test for bug #302
(transplanted from 80fd8fab87
)
Changed DenseIndex to Index
2015-04-26 21:05:33 +02:00
Gael Guennebaud
899c0c2b6c Clean source code and unit tests with respect to -Wunused-local-typedefs 2013-04-10 22:27:35 +02:00
Benoit Jacob
69124cfca2 Automatic relicensing to MPL2 using Keirs script. Manual fixup follows. 2012-07-13 14:42:47 -04:00
Gael Guennebaud
42e2578ef9 the min/max macros to detect unprotected min/max were undefined by some std header,
so let's declare them after and do the respective fixes ;)
2011-08-19 14:18:05 +02:00
Gael Guennebaud
a8f66fec65 add the possibility to configure the maximal matrix size in the unit tests 2011-07-12 14:41:00 +02:00
Benoit Jacob
4716040703 bug #86 : use internal:: namespace instead of ei_ prefix 2010-10-25 10:15:22 -04:00
Hauke Heibel
f1679c7185 Utilize Index in all unit tests. 2010-06-20 17:37:56 +02:00
Hauke Heibel
1c9b7a8d9f Fighting for a green dashboard! Next warning's gone. 2010-06-08 16:02:22 +02:00
Adolfo Rodriguez Tsouroukdissian
28dde19e40 - Added problem size constructor to decompositions that did not have one. It preallocates member data structures.
- Updated unit tests to check above constructor.
- In the compute() method of decompositions: Made temporary matrices/vectors class members to avoid heap allocations during compute() (when dynamic matrices are used, of course).

These  changes can speed up decomposition computation time when a solver instance is used to solve multiple same-sized problems. An added benefit is that the compute() method can now be invoked in contexts were heap allocations are forbidden, such as in real-time control loops.

CAVEAT: Not all of the decompositions in the Eigenvalues module have a heap-allocation-free compute() method. A future patch may address this issue, but some required API changes need to be incorporated first.
2010-04-21 17:15:57 +02:00
Gael Guennebaud
7dd81aad74 factorize default performance related settings to a single file
included after the architecture specific files such that they
can be adapted by each platform.
2010-03-03 18:47:58 +01:00
Gael Guennebaud
7c98c04412 add reconstructedMatrix() to LLT, and LUs
=> they show that some improvements have still to be done
   for permutations, tr*tr, trapezoidal matrices
2010-02-24 19:16:10 +01: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
Hauke Heibel
abc8c01080 Renamed PlainMatrixType to PlainObject (Array != Matrix).
Renamed ReturnByValue::ReturnMatrixType ReturnByValue::ReturnType (again, Array != Matrix).
2010-02-20 15:53:57 +01:00
Benoit Jacob
828d058b4b EIGEN_ENUM_MIN ---> EIGEN_SIZE_MIN 2010-01-27 11:42:04 -05:00
Benoit Jacob
b90744dc05 Port FullPivLU to PermutationMatrix 2009-11-16 17:05:12 -05:00
Benoit Jacob
9a0900e33e last round of changes, mainly to return derived types instead of base types, and fix various compilation issues 2009-11-09 07:51:31 -05:00
Benoit Jacob
da363d997f introduce ei_xxx_return_value and ei_xxx_impl for xxx in solve,kernel,impl
put them in a new internal 'misc' directory
2009-11-03 02:18:10 -05:00
Benoit Jacob
6b48e932e9 *port the Cholesky module to the new solve() API
*improve documentation
2009-10-29 21:11:05 -04: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
580672ea43 Add new default option EIGEN_SPLIT_LARGE_TESTS and cmake macro ei_add_test_multi.
When enabled, large tests are split into smaller executables.
This needs minimal changes in the unit tests.
Updated the LU test to use it.
2009-10-19 13:29:00 -04:00
Benoit Jacob
9a700c2974 * LU unit test: finally test fixed sizes
* ReturnByValue: after all don't eval to temporary for generic MatrixBase impl
2009-10-19 10:56:37 -04:00
Benoit Jacob
47eeb40380 remove the m_originalMatrix member. Instead, image() now takes the original matrix as parameter. It was the only method to use it anyway. Introduce m_isInitialized. 2009-10-18 15:21:19 -04:00
Benoit Jacob
0255f28279 oops, didn't want to commit that 2009-10-18 01:35:07 -04:00
Benoit Jacob
8332c232db big huge changes in LU!
* continue the decomposition until a pivot is exactly zero;
  don't try to compute the rank in the decomposition itself.
* Instead, methods such as rank() use a new internal parameter
  called 'threshold' to determine which pivots are to be
  considered nonzero.
* The threshold is by default determined by defaultThreshold()
  but the user can override that by calling useThreshold(value).
* In solve/kernel/image, don't assume that the diagonal of U
  is sorted in decreasing order, because that's only approximately
  true. Additional work was needed to extract the right pivots.
2009-10-18 00:47:40 -04:00
Benoit Jacob
e82ab8a5dd move also inverse() to ReturnByValue, by doing a solve on NestByValue<Identity>.
also: adding resize() to MatrixBase was really needed ;)
2009-09-26 11:40:29 -04:00
Benoit Jacob
176c26feb5 allow to do xpr = solve(b) etc... just by adding a dummy MatrixBase::resize() 2009-09-22 01:41:09 -04:00
Benoit Jacob
4f9e270343 * make LU::kernel() and LU::image() also use ReturnByValue
* make them return zero vector in the degenerate case, instead of asserting
  (let's stick to the principle that we only assert on memory errors)
2009-09-22 00:16:51 -04:00
Benoit Jacob
ab5cc8284a convert LU::solve() to the new API 2009-09-22 20:58:29 -04:00
Benoit Jacob
154bdac9f4 small improvements 2009-08-24 00:09:01 -04:00
Benoit Jacob
7b750182f2 * polish computeInverseWithCheck to share more code, fix documentation, fix coding style
* add snippet for computeInverseWithCheck documentation
* expand unit-tests to cover computeInverseWithCheck
2009-06-29 22:07:37 +02:00
Benoit Jacob
7667a93cbe merge 2009-05-22 20:31:26 +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
Hauke Heibel
2c247fc8a8 LU and PartialLU decomposition interface unification.
Added default ctor and public compute method as well
as safe-guards against uninitialized usage.
Added unit tests for the safe-guards.
2009-05-22 14:27:58 +02: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
Benoit Jacob
9e3c73110a fix a bunch of warnings (actual issues) reported by Frank 2009-01-22 00:09:34 +00:00
Benoit Jacob
294682a25a lu test:don't fail 2009-01-20 19:06:39 +00:00
Benoit Jacob
c22d10f94c LU class:
* add image() and computeImage() methods, with unit test
* fix a mistake in the definition of KernelResultType
* fix and improve comments
2008-12-17 16:47:55 +00:00
Benoit Jacob
00f89a8f37 Update e-mail address 2008-11-24 13:40:43 +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
2120fed849 * bug fixes in: Dot, generalized eigen problem, singular matrix detetection in Cholesky
* fix all numerical instabilies in the unit tests, now all tests can be run 2000 times
  with almost zero failures.
2008-08-23 15:14:20 +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
d6e88f8155 * add LU unit-test. Seems like we have very good numerical stability!
* some cleanup, and grant me a copyright line on the determinant test.
2008-08-09 19:26:14 +00:00