Commit Graph

385 Commits

Author SHA1 Message Date
Gael Guennebaud
1a1b2e9f27 finally directly calling the low-level products is faster 2009-07-10 10:41:26 +02:00
Gael Guennebaud
fa60c72398 started to simplify the triangular solvers 2009-07-09 17:11:03 +02:00
Gael Guennebaud
96e7d9f896 ok now all the complex mat-mat and mat-vec products involving conjugate,
adjoint, -, and scalar multiple seems to be well handled. It only remains
the simpler case: C = alpha*(A*B) ... for the next commit
2009-07-08 18:24:37 +02:00
Gael Guennebaud
13b2dafb50 conjugate expressions are now properly caught by Product
=> significant speedup in expr. like a.adjoint() * b,
   for complex scalar type (~ x3)
2009-07-07 21:30:20 +02:00
Gael Guennebaud
79877a9917 * take advantage of new possibilies in LLT (mat -= product)
* fix Block::operator+= product which was not optimized
* fix some compilation issues
2009-07-07 15:32:21 +02:00
Gael Guennebaud
92a35c93b2 * extended the cache friendly products to support C = alpha * A * M and C += alpha * A * B
* this allows to optimize xpr like C -= lazy_product, still have to catch "scalar_product_of_lazy_product"
* started to support conjugate in cache friendly products (very useful to evaluate A * B.adjoint() without
  evaluating B.adjoint() into a temporary
* compilation fix
2009-07-07 11:39:19 +02:00
Gael Guennebaud
1aea45335f * bybye Part, welcome TriangularView and SelfAdjointView.
* move solveTriangular*() to TriangularView::solve*()
* move .llt() to SelfAdjointView
* add a high level wrapper to the efficient selfadjoint * vector product
* improve LLT so that we can specify which triangular part is meaningless
=> there are still many things to do (doc, cleaning, improve the matrix products, etc.)
2009-07-06 23:43:20 +02:00
Gael Guennebaud
08e419dcb1 * update sparse module wrt new diagonal matrix impl
* fix a bug is SparseMatrix
2009-07-04 11:16:27 +02:00
Benoit Jacob
2de9b7f537 fully vectorize DiagonalProduct
(it used to be partially vectorized and that had been lost in the big changes from the previous commit)
2009-06-29 04:01:31 +02:00
Benoit Jacob
6809f7b1cd new implementation of diagonal matrices and diagonal matrix expressions 2009-06-28 21:27:37 +02:00
Gael Guennebaud
627595ad19 * rename PartialRedux to VectorwiseOp
* add VectorwiseOp's +, -, +=, -= operators
2009-06-10 11:20:30 +02:00
Benoit Jacob
ee92009fd8 make Umeyama, and its unit-test, work for me on gcc 4.3 2009-05-27 23:10:24 +02:00
Hauke Heibel
4d1e492c00 * Umeyama has now similar performance for RowMajor and ColMajor layouts.
* Fixed a bug in umeyama for fixed size matrices.
* Fixed the umeyama unit test for fixed size matrices.
* Added XprHelper::ei_plain_matrix_type_row_major.
2009-05-27 19:24:05 +02:00
Hauke Heibel
db5647abae Added Umeyama implementation. 2009-05-26 19:22:25 +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
c7303a876f Oops, here the actual LLT and LDLT patch. 2009-05-22 15:58:20 +02:00
Hauke Heibel
0523b64fe9 Eigensolver 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
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
5c5789cf0f QR and SVD 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
Gael Guennebaud
dd45c4805c * add a writable generic coeff wise expression (CwiseUnaryView)
* add writable .real() and .imag() functions
2009-05-20 15:41:23 +02:00
Gael Guennebaud
f47c4b5da8 update cdash testsuite file to use mercurial 2009-05-19 09:24:22 +02:00
Gael Guennebaud
e186728867 fix #1 : need to nest by value the affine part in homogeneous product 2009-05-18 17:55:50 +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
Gael Guennebaud
877c3c00a2 enable testing of complex numbers for taucs 2009-05-12 13:43:40 +00:00
Gael Guennebaud
f5b5571a5a compilation fixes 2009-05-12 07:32:34 +00:00
Gael Guennebaud
9b256d997e various minor updates of some unit tests 2009-05-11 11:09:41 +00:00
Benoit Jacob
9afd1324fd constant Diagonal ---> DiagonalBits
introduce ei_is_diagonal to check for it
DiagonalCoeffs ---> Diagonal and allow Index to by Dynamic
-> add MatrixBase::diagonal(int) with unittest and doc
2009-05-10 16:24:39 +00:00
Benoit Jacob
eac79b6d2e CREDIT Hauke Heibel, fix MSVC warnings 2009-05-09 03:41:17 +00:00
Benoit Jacob
4f0af00e51 *add missing overloads of setZero, etc... that were mentioned in the tutorial
--->they go into Matrix as they resize.
*add isConstant() alias to isApproxToConstant()
*extend unit-test
*change an assert into a static assert
2009-05-06 21:40:24 +00:00
Gael Guennebaud
1e286464ab * compilation fixes for gcc 3.3
* test Part::swap
2009-05-06 08:43:38 +00:00
Benoit Jacob
2b2f0c0220 fix linearRegression, fix doc, add unit test (it was untested since the change
making fitHyperplane no longer use it)
2009-05-05 16:50:58 +00:00
Gael Guennebaud
2829314284 new simplified API to fill sparse matrices (the old functions are
deprecated). Basically there are now only 2 functions to set a
coefficient:
1) mat.coeffRef(row,col) = value;
2) mat.insert(row,col) = value;
coeffRef has no limitation, insert assumes the coeff has not already
been set, and raises an assert otherwise.
In addition I added a much lower level, but more efficient filling
mechanism for
internal use only.
2009-05-04 14:25:12 +00:00
Gael Guennebaud
469b8aa380 "forgot to commit the required changes in stdvector unit test" 2009-05-03 15:39:37 +00:00
Benoit Jacob
95bda5e6ab let the user disable alignment altogether by #defining EIGEN_DONT_ALIGN.
Until now, the user had to edit the source code to do that.
Internally, add EIGEN_ALIGN that takes into account both EIGEN_DONT_ALIGN.and
EIGEN_ARCH_WANTS_ALIGNMENT. From now on, only EIGEN_ALIGN should be used to
test whether we want to align.
2009-05-03 13:50:56 +00:00
Benoit Jacob
746079f75d gni, forgot to call the new subtest 2009-04-29 17:01:10 +00:00
Benoit Jacob
8b1e7c2792 add cast<>() tests. including a vectorization_logic test that currently fails (casting to same type should not prevent vectorization) 2009-04-29 14:51:19 +00:00
Gael Guennebaud
804a239d30 patch from Moritz Lenz to allow solving transposed problem with superlu 2009-04-10 19:54:43 +00:00
Gael Guennebaud
22edf77470 add a 4x4 inverse case which is not handled by the current
ei_compute_inverse_in_size4_case (reported by mikola on IRC)
2009-04-09 21:55:29 +00:00
Gael Guennebaud
5b1d0cebc5 sparse module: new API proposal for triangular solves and experimental
solver support with a sparse matrix as the rhs.
2009-04-05 16:30:10 +00:00
Benoit Jacob
2f45eeb0c6 More Cholesky fixes.
* Cholesky decs are NOT rank revealing so remove all the rank/isPositiveDefinite etc stuff.
* fix bug in LLT: s/return/continue/
* introduce machine_epsilon constants, they are actually needed for Higman's formula determining
  the cutoff in Cholesky. Btw fix the page reference to his book (chat with Keir).
* solve methods always return true, since this isn't a rank revealing dec. Actually... they already did always return true!! Now it's explicit.
* updated dox and unit-test
2009-04-01 00:21:16 +00:00
Benoit Jacob
bf596d0b3a add adjointInPlace() and add documentation warnings on adjoint() and transpose() about aliasing effects. 2009-03-31 13:55:40 +00:00
Benoit Jacob
a1ba995f05 Many improvements in LLT and LDLT:
* in LDLT, support the negative semidefinite case
* fix bad floating-point comparisons, improves greatly the accuracy of methods like
  isPositiveDefinite() and rank()
* simplifications
* identify (but not resolve) bug: claim that only triangular part is used, is inaccurate
* expanded unit-tests
2009-03-30 21:45:45 +00:00
Gael Guennebaud
49fc1e3e84 add vectorization of sqrt for float 2009-03-27 14:41:46 +00:00
Gael Guennebaud
17860e578c add SSE2 versions of sin, cos, log, exp using code from Julien
Pommier. They are for float only, and they return exactly the same
result as the standard versions in about 90% of the cases. Otherwise the max error
is below 1e-7. However, for very large values (>1e3) the accuracy of sin and cos
slighlty decrease. They are about 3 or 4 times faster than 4 calls to their respective
standard versions. So, is it ok to enable them by default in their respective functors ?
2009-03-25 12:26:13 +00:00
Gael Guennebaud
f4cf5e9b26 split and extend eigen-solver tests 2009-03-23 14:38:59 +00:00
Gael Guennebaud
fbf415c547 add vectorization of unary operator-() (the AltiVec version is probably
broken)
2009-03-20 10:03:24 +00:00
Gael Guennebaud
b8f46090ff add optimized cross3 function (code from Rohit Garg) 2009-03-11 14:20:36 +00:00
Gael Guennebaud
3f80c68be5 add the vectorization of abs 2009-03-09 18:40:09 +00:00