Commit Graph

661 Commits

Author SHA1 Message Date
Gael Guennebaud
5adfe934c8 add checks for on the right triangular solving with matrices 2009-12-23 10:24:13 +01:00
Gael Guennebaud
fcc3be5dce a couple of fixes after thye merge 2009-12-23 09:07:01 +01:00
Gael Guennebaud
eaaba30cac merge with default branch 2009-12-22 22:51:08 +01:00
Gael Guennebaud
af4d8c5cec a couple of fixes, now Array passes the linearstructure test 2009-12-17 19:28:54 +01:00
Gael Guennebaud
ebb2878829 finally add a Array class with storage via the introduction of a DenseStorageBase
base class shared by both Matrix and Array
2009-12-17 13:37:00 +01:00
Gael Guennebaud
30d47860dd more fixes 2009-12-17 10:43:46 +01:00
Gael Guennebaud
34c95029ca a couple of fixes and cleaning 2009-12-17 10:00:35 +01:00
Jitse Niesen
945cbc3bc6 Add test for issue #75 (Hessenberg of 1x1 matrix).
Also remove an superfluous #include in matrixExponential test.
2009-12-16 22:24:24 +00:00
Gael Guennebaud
2033903376 a trivial compilation fix 2009-12-16 19:21:10 +01:00
Gael Guennebaud
9f79558839 a lot of cleaning and fixes 2009-12-16 19:18:40 +01:00
Gael Guennebaud
22a6ab1f4b add an eigen2support test and a few fixes 2009-12-16 17:37:21 +01:00
Gael Guennebaud
6db6774c46 * fix aliasing checks when the lhs is also transposed. At the same time,
significantly simplify the code of these checks while extending them
  to catch much more expressions!
* move the enabling/disabling of vectorized sin/cos to the architecture traits
2009-12-16 11:41:16 +01:00
Gael Guennebaud
7a9988ebb6 fix spasre triangular solve for row major lower matrices 2009-12-14 10:25:21 +01:00
Benoit Jacob
46a9cac7fb silence 'statement has no effect' warning with gcc 4.4 2009-12-14 23:31:00 -05:00
Benoit Jacob
4948448939 *use scalar instructions, packet not needed here
*remove unused var warning
2009-12-14 23:13:54 -05:00
Benoit Jacob
d02eccf584 add SSE path for Matrix4f inverse, taken from Intel except that we do a kosher
division instead of RCPPS-followed-by-Newton-Raphson. The rationale for that is
that elsewhere in Eigen we dont allow ourselves this approximation (which throws
2 bits of mantissa), so there's no reason we should allow it here.
2009-12-14 22:47:14 -05:00
Hauke Heibel
3dce51bd8e Removed more warnings. 2009-12-12 14:49:43 +01:00
Hauke Heibel
d088ee35f6 Added to possibility to compile unit tests at maximum warning level.
Silenced (amongst others) many conversion related warnings.
2009-12-12 11:39:07 +01:00
Gael Guennebaud
9facdaf7b9 some compilation fixes 2009-12-10 22:15:22 +01:00
Gael Guennebaud
7caf751fdd adapt select, replicate and reverse 2009-12-10 22:00:35 +01: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
Gael Guennebaud
8e05f9cfa1 add a DenseBase class for MAtrixBase and ArrayBase and more code factorisation 2009-12-04 23:17:14 +01: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
Hauke Heibel
84551d067e merge 2009-12-02 11:08:44 +01:00
Mark Borgerding
c05ae35441 merge with tip 2009-12-01 18:03:15 -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
95d88e1327 Big reworking of ColPivQR and its unit test, which now passes even with thousands of repetitions and correctly tests matrices of all sizes. Several surprises along the way: for example, a major cause of trouble was the optimized "table of column squared norms" where the accumulation of imprecision was a serious issue; another surprise is that tests like "x!=0" before dividing by x really benefit from being replaced by fuzzy tests, as i hit real cases where i got wrong results in 1/epsilon. 2009-12-01 13:26:29 -05:00
Hauke Heibel
2bf354da80 Much more NestByValue cleanup. 2009-12-01 11:51:22 +01:00
Benoit Jacob
4b1aca2288 precision ---> dummy_precision 2009-11-26 22:05:02 -05:00
Benoit Jacob
5923bcb1b9 improve the scripts for building unit tests:
* support unsupported/
* use egrep instead of grep, properly escape special chars.
2009-11-25 21:26:37 -05:00
Thomas Capricelli
f795681da0 export stableNorm(), blueNorm() and hypotNorm() to colwise() and rowwise()
+ rudimentary test
2009-11-26 02:28:13 +01:00
Benoit Jacob
1e2bcba5e4 forward port slight changes in the 4x4 inverse test 2009-11-25 09:08:03 -05:00
Benoit Jacob
e6ea9e401c improve precision test 2009-11-23 11:24:06 -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
Gael Guennebaud
eb8f450071 Hey, finally the copyCoeff stuff is not only used to implement swap anymore :)
Add an internal pseudo expression allowing to optimize operators like +=, *= using
the copyCoeff stuff.
This allows to easily enforce aligned load for the destination matrix everywhere.
2009-11-20 15:39:38 +01:00
Jitse Niesen
34be9d4537 Replace toDense() by toDenseMatrix() in tests. 2009-11-20 12:22:46 +00:00
Benoit Jacob
6cbf662f14 * don't laugh, but these bugs took me forever to fix.
* expand unit tests to make sure to catch them: they nearly escaped the existing tests as these memory violations were highly dependent on the numbers of rows and cols.
2009-11-19 22:01:13 -05:00
Benoit Jacob
eac3232095 minor improvements in triangular stuff 2009-11-19 20:50:50 -05:00
Benoit Jacob
88b551e89b * fix compilation of unit-tests (sorry, had tested only 1 channel)
* remove buggy (superfluous?) specialization in the meta-unroller
2009-11-19 19:20:19 -05:00
Benoit Jacob
a20a744adc TriangularMatrix: extend to rectangular matrices 2009-11-19 17:07:55 -05:00
Benoit Jacob
b5f4636d42 * eigen2->eigen3
* bump version to 2.91.0
* add FindEigen3.cmake
2009-11-19 12:09:04 -05:00
Benoit Jacob
126a8e6a69 fix remaining bug in ColPivHouseholderQR, so now all tests pass again 2009-11-18 17:40:45 -05:00
Benoit Jacob
8860203e6a fix stuff after the PermutationMatrix changes.
I still have JacobiSVD errors when cols>rows
2009-11-18 12:41:24 -05:00
Gael Guennebaud
e3d890bc5a Another big refactoring change:
* add a new Eigen2Support module including Cwise, Flagged, and some other deprecated stuff
* add a few cwiseXxx functions
* adapt a few modules to use cwiseXxx instead of the .cwise() prefix
2009-11-18 18:15:19 +01:00
Benoit Jacob
94c706d04f Assign.h: add LinearTraversal (non-vectorized index-based traversal)
Rename some constants to make names match more closely what they mean.
2009-11-18 11:57:07 -05:00
Gael Guennebaud
0529ecfe1b Big refactoring/cleaning in the spasre module with
in particular the addition of a selfadjointView, and the
extension of triangularView. The rest is cleaning and does not
change/extend the API.
2009-11-18 14:52:52 +01:00
Gael Guennebaud
1e62e0b0d8 more ET refactoring:
* extend Cwise for multiple storage base class
* a lot of cleaning in the Sparse module
2009-11-17 16:04:19 +01:00
Benoit Jacob
9f21e2aab7 port the QR module to PermutationMatrix 2009-11-17 08:14:54 -05:00
Benoit Jacob
07412b2075 PermutationMatrix: add setIdentity and transpositions methods
LU: make use of that
2009-11-16 21:28:26 -05:00
Benoit Jacob
b90744dc05 Port FullPivLU to PermutationMatrix 2009-11-16 17:05:12 -05:00
Benoit Jacob
eb6df28c6c DiagonalMatrix: release-quality documentation
BandMatrix: rename toDense() ---> toDenseMatrix() for consistency
2009-11-16 15:25:58 -05:00
Benoit Jacob
e8d0dbf82e PermutationMatrix:
* make multiplication order not be reversed
 * release-quality documentation
2009-11-16 15:07:33 -05:00
Benoit Jacob
b25eb5fdaa PermutationMatrix: add inverse() and product of permutations 2009-11-16 09:39:07 -05:00
Benoit Jacob
e09768e3bc handle make errors ---> exit, don't run ctest 2009-11-16 09:38:44 -05:00
Thomas Capricelli
f7e73f1bf9 don't be shy and test them all 2009-11-16 04:20:13 +01:00
Benoit Jacob
955cd7f884 * add PermutationMatrix
* DiagonalMatrix:
   - add MaxSizeAtCompileTime parameter
   - DiagonalOnTheLeft ---> OnTheLeft
   - fix bug in DiagonalMatrix::setIdentity()
2009-11-15 21:12:15 -05:00
Mathieu Gautier
6680fa42ee * add Map<Quaternion> test based on Map from test/map.cpp
* replace implicit constructor AngleAxis(QuaternionBase&) by an explicit one, it seems ambiguous for the compiler
* remove explicit constructor with conversion type quaternion(Quaternion&): conflict between constructor.
* modify EIGEN_INHERIT_ASSIGNEMENT_OPERATORS to suit Quaternion class
2009-11-13 16:41:51 +01:00
Benoit Jacob
7e3c4096d8 xargs ---> xargs echo
(xargs alone doesnt seem to be documented in the man page, while xargs echo is documented)
2009-11-12 15:37:50 -05:00
Benoit Jacob
9b7708f660 introduce check target, and some renaming 2009-11-12 15:02:52 -05:00
Benoit Jacob
8132ee3908 * add non-default option to initialize matrices by 0
(useful for porting)
* maketests really has to be in test/
2009-11-12 12:39:22 -05:00
Benoit Jacob
358452bbe6 * add ./debug and ./release scripts
* update the messages
* rename EIGEN_CMAKE_RUN_FROM_CTEST to something saner
2009-11-12 12:07:18 -05:00
Benoit Jacob
fc492b6264 add mctestr script. In your build directory, just do:
./mctestr ^qr 5
and it will build all tests matching ^qr with 5 jobs and then do `ctest -R ^qr`
2009-11-12 09:35:10 -05:00
Benoit Jacob
bc18ba7e49 * add maketests script. It is like make but takes a regexp allowing to build selected targets. Next step will be a "mctestr" script doing that and then calling ctest -R.
* in runtest.sh, don't override the default number of repeats. If one thinks the default should be changed, let's change it at the source.
2009-11-11 21:25:21 -05:00
Benoit Jacob
ff7fbc9431 * use standard CMAKE_BUILD_TYPE
* remove debug_xxx targets
* runtest.sh: don't run make
2009-11-11 16:11:33 -05:00
Benoit Jacob
a440385b41 *adapt Householder to the convention that we now favor refs over ptrs for output. Keep "workspace" as pointer because it is an array (which is now more obvious).
*rename makeHouseholderSequence to householderSequence, because that's what it returns.
2009-11-10 21:22:20 -05:00
Benoit Jacob
92749eed11 * merge
* remove a ctor in QuaternionBase as it gives a strange error with GCC 4.4.2.
2009-11-09 09:08:03 -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
ba7bfe110c port the qr module to ei_solve_xxx. 2009-11-08 10:21:26 -05:00
Jitse Niesen
daa4574a43 Add regression test for issue #66 (ComplexSchur of zero matrix). 2009-11-05 03:46:18 +00:00
Benoit Jacob
0182695204 move cholesky to ei_xxx_return_value 2009-11-03 11:34:45 -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
f975b9bd3e SVD::solve() : port to new API and improvements 2009-10-30 08:51:33 -04: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
e8dd552257 sync with mainline 2009-10-28 19:06:45 -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
44cdbaba4d * make inverse() do a ReturnByValue
* add computeInverseWithCheck
* doc improvements
* update test
2009-10-26 14:16:50 -04:00
Benoit Jacob
ec02388a5d big rewrite in Inverse.h
in particular, the API is essentially finalized and the 4x4 case is fixed to be numerically stable.
2009-10-26 11:18:23 -04:00
Gael Guennebaud
a382963b04 * extend Map to allow the user to specify whether the mapped data
is aligned or not. This is done using the Aligned constant:
  Map<MatrixType,Aligned>::Map(data);
* rename ForceAligned to EnforceAlignedAccess, and update its doc,
  and emphasize this is mainly an internal stuff.
2009-10-23 14:26:14 +02:00
Benoit Jacob
83a7b7c44c support gcc 3.3 2009-10-22 15:56:10 -04:00
Benoit Jacob
13f31b8daf * make PartialLU avoid to generate inf/nan when given a singular matrix
(result undefined, but at least it won't take forever on intel 387)
* add lots of comments, especially to LU.h
* fix stuff I had broken in Inverse.h
* split inverse test
2009-10-20 00:36:07 -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
3c4a025a54 merge 2009-10-15 16:09:43 -04:00
Hauke Heibel
0927ba1fd3 More warning fixes. 2009-10-14 19:55:23 +02:00
Gael Guennebaud
1443094072 compilation fix: make the generic template ctor explicit 2009-10-13 09:23:09 +02:00
Gael Guennebaud
2049f742e4 trivial compilation fix 2009-10-13 08:53:01 +02:00
Benoit Jacob
c4ab6a2032 also test that the matrix Q is unitary 2009-10-12 22:33:51 -04:00
Hauke Heibel
e5bf72679c Fixed nmake parameter.
Disabled debug_* targets for MSVC_IDE (they already exist).
Removed the make usage message for MSVC_IDE.
2009-10-09 14:09:25 +02:00
Gael Guennebaud
af31345df3 really fix stable norm compilation for older gcc 2009-10-07 14:25:12 +02:00
Gael Guennebaud
4cf7366027 fix compilation in stable norm, move a platform check to the unit tests 2009-10-06 10:24:41 +02:00
Gael Guennebaud
904f35d194 discard vectorization in matrix-vector product when data is not even
aligned on the scalar type size (e.g., for double on 32 bits system without -malign-double)
2009-10-05 17:22:16 +02:00
Benoit Jacob
bb1cc0d092 after all we're not aligning to 8byte boundary
keep most of the changes though as they make the code more extensible
2009-10-05 10:55:42 -04:00
Benoit Jacob
d41577819b we were already aligning to 16 byte boundary fixed-size objects that are multiple of 16 bytes;
now we also align to 8byte boundary fixed-size objects that are multiple of 8 bytes.
That's only useful for now for double, not e.g. for Vector2f, but that didn't seem to hurt. Am I missing something? Do you prefer that we don't align Vector2f at all?
Also, improvements in test_unalignedassert.
2009-10-05 10:11:11 -04:00
Benoit Jacob
a9a9ba8453 remove unneeded stuff 2009-10-05 07:58:53 -04:00
Benoit Jacob
fa9fc1397b next attempt ... introduce EIGEN_CMAKE_RUN_FROM_CTEST, in that case don't EXCLUDE_FROM_ALL 2009-10-05 07:42:31 -04:00