Commit Graph

822 Commits

Author SHA1 Message Date
Gael Guennebaud
9ffc0f6975 an attempt to fix 133 2010-06-13 23:29:44 +02:00
Hauke Heibel
eb95c57a9f Fixed another enum related warning. 2010-06-12 19:42:16 +02:00
Hauke Heibel
91c7af28a8 Remove printouts. 2010-06-12 15:16:39 +02:00
Gael Guennebaud
03331552a9 add a info() function in LLT to report on succes/faillure 2010-06-12 10:12:22 +02:00
Benoit Jacob
d72d538747 merge my Dynamic -> -1 change 2010-06-11 08:04:06 -04:00
Benoit Jacob
bdd7c6c88a change the value of Dynamic to -1, since the index type is now configurable.
remove EIGEN_ENUM_MIN/MAX, implement new macros instead
2010-06-11 07:56:50 -04:00
Hauke Heibel
00267e3a47 Added some verbosity on failures in order to get an idea of what is goind wrong on GCC 4.3. 2010-06-11 12:13:29 +02:00
Hauke Heibel
f48af91c7e For 1x1 matrices we really need to check the abs diff of the determinants. 2010-06-11 08:08:12 +02:00
Jitse Niesen
4d597e4654 Merge. 2010-06-10 21:28:10 +01:00
Jitse Niesen
fcab4c951d Add line to prevent compiler warning on unused variables. 2010-06-10 21:26:23 +01:00
Gael Guennebaud
842b54fe80 make the cache size mechanism future proof by adding level 2 parameters 2010-06-10 22:11:31 +02:00
Jitse Niesen
54235879a9 Make test slightly fuzzy to account for effect of extended precision. 2010-06-10 19:18:19 +01:00
Gael Guennebaud
469382407c * Make HouseholderSequence::evalTo works in place
* Clean a bit the Triadiagonalization making sure it the inplace
  function really works inplace ;), and that only the lower
   triangular part of the matrix is referenced.
* Remove the Tridiagonalization member object of SelfAdjointEigenSolver
  exploiting the in place capability of HouseholdeSequence.
* Update unit test to check SelfAdjointEigenSolver only consider
  the lower triangular part.
2010-06-10 16:39:46 +02:00
Hauke Heibel
941ca80b80 Adapted the determinant test for rank 1 matrices with zero determinant. 2010-06-10 10:06:14 +02:00
Gael Guennebaud
8855c4e264 fix unit test when GSL is enabled 2010-06-10 00:19:45 +02:00
Gael Guennebaud
e242ac9345 fix LDLT, now it really only uses a given triangular part! 2010-06-09 14:01:06 +02:00
Gael Guennebaud
201bd253ad fix ldlt unit test 2010-06-09 13:18:10 +02:00
Hauke Heibel
8cc02169fd Fix devision by zero warning. 2010-06-09 09:48:06 +02:00
Hauke Heibel
45d3b405eb Fixed many MSVC warnings. 2010-06-09 09:30:22 +02:00
Hauke Heibel
8b0da2de64 Fix stable_norm compilation. 2010-06-08 20:09:39 +02:00
Hauke Heibel
1c9b7a8d9f Fighting for a green dashboard! Next warning's gone. 2010-06-08 16:02:22 +02:00
Hauke Heibel
4c5778d29d Made the supression of unused variables portable.
EIGEN_UNUSED is not supported on non GCC systems.
2010-06-08 15:52:00 +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
Gael Guennebaud
4b5d359c3a improve/fix stable_norm unit test 2010-06-08 13:29:27 +02:00
Hauke Heibel
626afe8b62 Fixed integer type warnings. 2010-06-08 10:06:14 +02:00
Hauke Heibel
bda40da002 Fixed GCC compilation. 2010-06-08 09:37:13 +02:00
Hauke Heibel
f6d26bf6dc Fixed more warnings. 2010-06-08 00:41:33 +02:00
Hauke Heibel
04274f6793 Fixed eigensolver warning. 2010-06-08 00:05:20 +02:00
Gael Guennebaud
bfeba41174 Add a Transpositions class to ease the representation and
manipulation of permutations as a sequence of transpositions.
Make LDLT use it.
2010-06-04 23:17:57 +02:00
Jitse Niesen
1ff1bd69ac Schur decomposition of 1-by-1 always converges. 2010-06-04 09:40:35 +01:00
Jitse Niesen
9178e2bd54 Add info() method which can be queried to check whether iteration converged. 2010-06-03 22:59:57 +01:00
Gael Guennebaud
e64460d5d0 LDLT: make it honors the Lower/Upper directive and make it works inplace 2010-06-03 22:22:14 +02:00
Gael Guennebaud
d92de9574a fix sparse LDLT with complexes 2010-06-03 11:56:08 +02:00
Gael Guennebaud
8710bd23e7 clean the ambiguity with insertBack and add a insertBackByOuterInner function 2010-06-02 13:32:13 +02:00
Gael Guennebaud
143e6ab9d0 improve aliasing detection for inverse and add unit test 2010-06-02 10:12:13 +02:00
Gael Guennebaud
4ebb80490a implicit conversion to scalar for inner product 2010-06-02 09:45:57 +02:00
Benoit Jacob
e54faba198 merge the backing-out of the stupid RetByVal change, and implement a simple
aliasing check in inverse, that catches simple cases like x = x.inverse()
2010-06-01 09:17:50 -04:00
Benoit Jacob
3e95609cd4 Backed out changeset 641d968a9a 2010-06-01 09:01:39 -04:00
Benoit Jacob
aaaade4b3d the Index types change.
As discussed on the list (too long to explain here).
2010-05-30 16:00:58 -04: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
Benoit Jacob
641d968a9a * Make ReturnByValue have the EvalBeforeAssigningBit and explicitly
enforce this mechanism (otherwise ReturnByValue bypasses it).
 (use .noalias() to get the old behavior.)
* Remove a hack in Inverse, futile optimization for 2x2 expressions.
2010-05-30 13:43:08 -04:00
Jitse Niesen
8dc947821b Allow user to compute only the eigenvalues and not the eigenvectors. 2010-05-31 18:17:47 +01:00
Jitse Niesen
609941380a Change skipU argument to computeU - this reverses the meaning.
See "skipXxx / computeXxx parameters in Eigenvalues module" on mailing list.
2010-05-31 16:48:41 +01:00
Jitse Niesen
c21390a611 Define non-const operator() in Reverse; enable test for this.
Introduction of DenseCoeffBase (revision bfdc1c4973
) meant that non-const
operator() is only defined if DirectAccess is set. This caused the line
"m.reverse()(1,0) = 4;" in MatrixBase_reverse.cpp to fail at compile-time.
Not sure this is correct solution; perhaps we should disallow this? Or make
Reverse DirectAccess with a negative stride - would that break something?
2010-05-31 14:42:04 +01:00
Jitse Niesen
07a65dd02b Fix stupid compilation error in test. 2010-05-31 11:48:47 +01:00
Jitse Niesen
db8631b66a Guard with assert against using decomposition objects uninitialized. 2010-05-30 21:49:35 +01:00
Jitse Niesen
e7dc772554 Respect MaxRowsAtCompileTime in HouseholderSequence::evalTo().
This fixes the failing test nomalloc_4.
Also remove a print inserted for debugging in schur_real test.
2010-05-25 12:40:42 +01:00
Jitse Niesen
e7d809d434 Update eigenvalues() and operatorNorm() methods in MatrixBase.
* use SelfAdjointView instead of Eigen2's SelfAdjoint flag.
* add tests and documentation.
* allow eigenvalues() for non-selfadjoint matrices.
* they no longer depend only on SelfAdjointEigenSolver, so move them to
  a separate file
2010-05-24 17:43:50 +01:00
Jitse Niesen
68820fd4e8 Use ReturnByValue mechanism for HessenbergDecomposition::matrixH(). 2010-05-24 17:36:13 +01:00
Jitse Niesen
eb3ca68684 Change return type of matrixH() method to HouseholderSequence.
This method is a member of Tridiagonalization and HessenbergDecomposition.
2010-05-24 17:35:54 +01:00
Thomas Capricelli
618640bf2b fix another warning 2010-05-21 02:14:46 +02:00
Thomas Capricelli
00a3d07795 display actual/expected warning if ei_isApprox() fails 2010-05-21 02:13:50 +02:00
Gael Guennebaud
64cbd45266 minor chnages in Taucs and Cholmod backends 2010-05-19 16:49:05 +02:00
Gael Guennebaud
bf09fe55ed fix selfadjoint to dense 2010-05-19 16:35:34 +02:00
Benoit Jacob
08fbfa93e0 make the cmake options EIGEN_DEFAULT_TO_ROW_MAJOR and disabling EIGEN_SPLIT_LARGE_TESTS work also for unsupported tests 2010-05-18 08:59:39 -04:00
Gael Guennebaud
6d08301dcc add regression test for previous fix 2010-05-13 23:34:04 +02:00
Benoit Jacob
82d898083f fix compilation error thanks to test case by Trevor Irons, and expand unit test 2010-05-09 13:20:46 -04:00
Benoit Jacob
5deda97413 remove bogus test that was failing 2010-05-08 15:56:52 -04:00
Benoit Jacob
bfdc1c4973 introduce DenseCoeffsBase: this is where the coeff / coeffRef / etc... methods go.
Rationale: coeffRef() methods should only exist when we have DirectAccess. So a natural thing to do would have been to use enable_if, but since there are many methods it made more sense to do the "enable_if" for the whole group by introducing a new class. And that also that the benefit of not changing method prototypes.
2010-05-08 13:45:31 -04:00
Benoit Jacob
38facbd55b kill the LeastSquares module.
I didn't even put it in Eigen2Support because it requires several other modules. But if you want we can always create a new module, Eigen2Support_LeastSquares...
2010-04-29 10:40:52 -04:00
Benoit Jacob
664f2d4508 dont try passing --version to qcc 2010-04-29 08:04:42 -04:00
Benoit Jacob
d3f97f7582 forgot hg add 2010-04-29 07:30:00 -04:00
Benoit Jacob
5d63d2cc4b * kill the retval typedefs, instead introduce ei_xxx_retval which does the job automatically in 99% cases and can be specialized
* add real/imag/abs2 global functions for Array
* document ei_global_math_functions_filtering_base
* improve unit tests
2010-04-28 22:42:34 -04: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
Carlos Becker
c4dda79904 Fixed stablenorm test, condition was not met when running tests 2010-04-26 00:20:20 +02:00
Benoit Jacob
1dd27ce280 merge 2010-04-23 09:06:28 -04:00
Benoit Jacob
f22ade8ee4 restrict operator[] to vectors, not matrices. 2010-04-23 09:05:46 -04:00
Benoit Jacob
a4f9ca44ab add minor to Eigen2Support 2010-04-22 20:49:01 -04:00
Benoit Jacob
2362eadcdd remove Minor
adapt 3x3 and 4x4 (non-SSE) inverse paths
2010-04-22 20:40:31 -04:00
Benoit Jacob
bc22f4da9d * fix Eigen2Support, was not including VectorBlock.h
* move the corners support stuff to a new Block.h there
* expand the unit test
2010-04-22 14:31:39 -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
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
Benoit Jacob
34b14c48f3 shut up stupid gcc 4.5.0 warning 2010-04-18 22:14:03 -04:00
Hauke Heibel
214d5a892d Added support for STL lists with aligned Eigen types. 2010-04-18 20:10:43 +02:00
Benoit Jacob
d9ee28851e fix ei_blas_traits directaccess check: in the case of vectors, having a nontrivial inner stride is OK. 2010-04-16 14:12:53 -04:00
Benoit Jacob
04c663840b * add some 1x1 tests
* temporarily disable tests that strangely fail, with a big FIXME
2010-04-16 12:32:33 -04:00
Benoit Jacob
0ab431d7b8 * merge with mainline
* adapt Eigenvalues module to the new rule that the RowMajorBit must have the proper value for vectors
* Fix RowMajorBit in ei_traits<ProductBase>
* Fix vectorizability logic in CoeffBasedProduct
2010-04-16 11:25:50 -04:00
Benoit Jacob
ff6a46105d * Refactoring of the class hierarchy: introduction of DenseDirectAccessBase, removal of extra _Base/_Options template parameters.
* Introduction of strides-at-compile-time so for example the optimized code really knows when it needs to evaluate to a temporary
* StorageKind / XprKind
* Quaternion::setFromTwoVectors: use JacobiSVD instead of SVD
* ComplexSchur: support the 1x1 case
2010-04-16 10:13:32 -04:00
Gael Guennebaud
a2324d6265 fix sparse squared norm 2010-04-13 10:40:55 +02:00
Jitse Niesen
73d3a27667 RealSchur: Make sure zeros are really zero (cont'd); add default ctor, docs. 2010-04-12 18:14:32 +01:00
Jitse Niesen
a16a36ecf2 Add tests for real and complex Schur; extend test for Hessenberg.
Make a minor correction to the ComplexSchur class.
2010-04-02 14:32:20 +01:00
Manuel Yguel
89f2d5667f Add the possibility to use the polynomial solver of the gsl. 2010-03-25 03:25:47 +01:00
Benoit Jacob
92da574ec2 * allow matrix dimensions to be 0 (also at compile time) and provide a specialization
of ei_matrix_array for size 0
* adapt many xprs to have the right storage order, now that it matters
* add static assert on expressions to check that vector xprs
  have the righ storage order
* adapt ei_plain_matrix_type_(column|row)_major
* implement assignment of selfadjointview to matrix
  (was before failing to compile) and add nestedExpression() methods
* expand product_symm test
* in ei_gemv_selector, use the PlainObject type instead of a custom Matrix<...> type
* fix VectorBlock and Block mistakes
2010-03-21 11:28:03 -04:00
Jitse Niesen
d91ffffc37 Allow ComplexEigenSolver and ComplexSchur to work with real matrices.
Add a test which covers this case.
2010-03-20 17:04:40 +00:00
Benoit Jacob
b81351cb07 nomalloc: minor cleanup 2010-03-08 21:30:06 -05:00
Adolfo Rodriguez Tsouroukdissian
5a36f4a8d1 Propagate all five matrix template parameters to members and temporaries of decomposition classes. One particular advantage of this is that decomposing matrices with max sizes known at compile time will not allocate.
NOTE: The ComplexEigenSolver class currently _does_ allocate (line 135 of Eigenvalues/ComplexEigenSolver.h), but the reason appears to be in the implementation of matrix-matrix products, and not in the decomposition itself.
The nomalloc unit test has been extended to verify that decompositions do not allocate when max sizes are specified. There are currently two workarounds to prevent the test from failing (see comments in test/nomalloc.cpp), both of which are related to matrix products that allocate on the stack.
2010-03-08 19:31:27 +01:00
Mark Borgerding
101cc03176 merge 2010-03-07 23:46:26 -05:00
Gael Guennebaud
aeea00a9cf fix compilation 2010-03-07 12:32:24 +01:00
Gael Guennebaud
a7d199bf9a fix trsolve 2010-03-06 21:37:14 +01:00
Benoit Jacob
2bd31d3fbc * include Macros.h much earlier: since it takes care of the alignment platform detection, it is needed before we do the vectorization stuff in Eigen/Core !!
* kill EIGEN_DONT_ALIGN_HEAP option (one should use EIGEN_DONT_ALIGN)
* rename EIGEN_DONT_ALIGN_STACK to EIGEN_DONT_ALIGN_STATICALLY. hope it's a better name.
2010-03-06 09:05:15 -05:00
Benoit Jacob
f03d95348d introduce EIGEN_DONT_ALIGN_STACK (disables alignment attributes) and EIGEN_DONT_ALIGN_HEAP (disables aligned malloc)...
you can still use EIGEN_DONT_ALIGN to do both at once.
2010-03-06 02:17:37 -05: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
Konstantinos Margaritis
112c550b4a Added initial NEON support, most tests pass however we had to use some hackish workarounds
as gcc on ARM (both CodeSourcery 4.4.1 used and experimental 4.5) fail to
ensure proper alignment with __attribute__((aligned(16))). This has to be
fixed upstream to remove the workarounds.
2010-03-03 11:25:41 -06:00
Gael Guennebaud
c7828ac45c add missing implementation of uniform scaling products 2010-03-02 17:38:40 +01:00
Benoit Jacob
bca04bd983 fix compilation 2010-03-02 08:41:35 -05:00
Jitse Niesen
a1ac56a7c7 Add (failing) test for computing HouseholderQR of a 1x1 matrix. 2010-03-01 13:46:41 +00:00
Benoit Jacob
27f5250258 Only include <iosfwd> unless either EIGEN_DEBUG_ASSIGN is defined or we're in eigen2 support mode 2010-02-27 19:04:22 -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
b1f666d007 Fix Map-with-Stride and cover it by new unit tests. 2010-02-26 20:12:51 -05:00