Commit Graph

1266 Commits

Author SHA1 Message Date
Hauke Heibel
64095b6610 Changed the AnyMatrixBase / ei_special_scalar_op inheritance order as proposed by Gael.
Added conservativeResizeLike as discussed on the mailing list.
2009-09-07 17:22:01 +02:00
Gael Guennebaud
bdcc0bc157 fix compilation of swap for ICC 2009-09-07 11:37:41 +02:00
Gael Guennebaud
225ec02b06 fix another .stride() issue in Cholmod support 2009-09-07 11:15:38 +02:00
Gael Guennebaud
61fe2b6a56 bug fix in SuperLU support: the meaning of Matrix::stride() changed for vectors 2009-09-07 10:55:33 +02:00
Gael Guennebaud
e4f94b8c58 enable ILU in super LU only if the super version supports it 2009-09-04 18:19:34 +02:00
Peter Román
80179e9549 Added support for SuperLU's ILU factorization 2009-08-21 11:14:45 +02:00
Gael Guennebaud
b0aa2520f1 * add real scalar * complex matrix, real matrix * complex scalar,
and complex scalar * real matrix overloads
* allows the inner and outer product specialisations to mix real and complex
2009-09-04 11:22:32 +02:00
Gael Guennebaud
6902ef0824 extend mixingtype test to check diagonal products and fix the later for real*complex products 2009-09-04 10:17:28 +02:00
Gael Guennebaud
a7ed998d52 bug fix in novel makeGivens for real 2009-09-04 10:05:22 +02:00
Gael Guennebaud
3fbf71d6b9 compilation fix for conservativeResize 2009-09-04 09:26:00 +02:00
Gael Guennebaud
68b28f7bfb rename the EigenSolver module to Eigenvalues 2009-09-04 09:23:38 +02:00
Hauke Heibel
7f5256f628 Added conservativeResize + unit test. 2009-09-03 17:27:51 +02:00
Gael Guennebaud
82ad37c730 implement the continuous generation algorithm of Givens rotations by Anderson (2000) 2009-09-03 17:08:38 +02:00
Hauke Heibel
41aea9508e This seems to be important for MSVC to optimize the size of empty base classes. 2009-09-03 13:46:44 +02:00
Gael Guennebaud
3eb37fe1fb update mixingtype unit test to reflect current status, but it is still clear
we should allow matrix products between complex and real ?
2009-09-03 13:03:26 +02:00
Gael Guennebaud
00f4b46908 typo in sqrt(complex) 2009-09-03 11:50:06 +02:00
Gael Guennebaud
a54b99fa72 move eigen values related stuff of the QR module to a new EigenSolver module.
- perhaps we can find a better name ?
- note that the QR module still includes the EigenSolver module for compatibility
2009-09-03 11:39:44 +02:00
Gael Guennebaud
9515b00876 remove the \addexample tags 2009-09-03 11:22:42 +02:00
Gael Guennebaud
16c7b1daab add examples for makeJacobi and makeGivens 2009-09-03 11:17:16 +02:00
Gael Guennebaud
c893917d65 Fix serious bug discovered with gcc 4.2 2009-09-03 10:45:32 +02:00
Hauke Heibel
8d449bd80e Removed debug cout.
Disabled MSVC inconsistent DLL linkage.
2009-09-02 21:23:09 +02:00
Benoit Jacob
7aa6fd3625 big reorganization in JacobiSVD:
- R-SVD preconditioning now done with meta selectors to avoid compiling useless code
- SVD options now honored, with options to hint "at least as many rows as cols" etc...
- fix compilation in bad cases (rectangular and fixed-size)
- the check for termination is now done on the fly, no more goto (should have done that earlier!)
2009-09-03 02:53:51 -04:00
Benoit Jacob
89557ac41d introduce EIGEN_SIZE_MIN
now we should check if some EIGEN_ENUM_MIN usage needs to be replaced by that... potential bug when using mixed-size matrice
2009-09-03 02:50:42 -04:00
Benoit Jacob
7d18c30641 finally the first version was the good one... 2009-09-03 01:25:40 -04:00
Gael Guennebaud
7586f7f706 fix #51 (bad use of std::complex::real) 2009-09-02 15:18:11 +02:00
Gael Guennebaud
b83654b5d0 * rename JacobiRotation => PlanarRotation
* move the makeJacobi and make_givens_* to PlanarRotation
* rename applyJacobi* => apply*
2009-09-02 15:04:10 +02:00
Gael Guennebaud
496ea63972 fix wrong assert 2009-09-02 14:08:33 +02:00
Gael Guennebaud
4a8258369a much simpler fix for Matrix::swap 2009-09-02 13:37:15 +02:00
Benoit Jacob
ec20d58317 * add serious unit test for swap
* fix my stupidity in Matrix::swap()
2009-09-02 16:56:48 -04:00
Benoit Jacob
cc375e2f79 merge 2009-09-02 06:37:41 -04:00
Benoit Jacob
e6b77bcc6b JacobiSVD: implement general R-SVD using full-pivoting QR, so we now support any rectangular matrix size by reducing to the smaller of the two dimensions (which is also an optimization) 2009-09-02 06:36:55 -04:00
Benoit Jacob
c16d65f015 fix compilation errors in swap (could not swap with anything else than the exact same Matrix type) 2009-09-02 06:35:01 -04:00
Hauke Heibel
05ddd32849 added missing JacobiRotation's ... 2009-09-01 23:12:40 +02:00
Gael Guennebaud
4d91229bdc [mq]: eigensolver 2009-09-01 16:20:56 +02:00
Gael Guennebaud
1e7a9ea70a fix issue #47: now m.noalias() = XXX properly resize m if needed 2009-09-01 13:35:44 +02:00
Gael Guennebaud
8392373d96 add a JacobiRotation class wrapping the cosine-sine pair with
some convenient features (transpose, adjoint, product)
2009-09-01 13:18:03 +02:00
Benoit Jacob
6e4e94ff32 * JacobiSVD:
- support complex numbers
 - big rewrite of the 2x2 kernel, much more robust
* Jacobi:
 - fix weirdness in initial design, e.g. applyJacobiOnTheRight actually did the inverse transformation
 - fully support complex numbers
 - fix logic to decide whether to vectorize
 - remove several clumsy methods

fix for complex numbers
2009-08-31 22:26:15 -04:00
Gael Guennebaud
a16599751f fix Matrix::stride for vectors, add a unit test for Block::stride
and make use of it where it was relevant
2009-08-31 17:39:56 +02:00
Hauke Heibel
ab6eb6a1a4 Adaptions from .lazy() towards .noalias().
Added missing casts.
2009-08-31 17:29:37 +02:00
Hauke Heibel
bc7aec0ef5 ifdef removed from MapBase and warning disabled 2009-08-31 17:24:38 +02:00
Gael Guennebaud
095809edda fix issue #45 and document the .data() and .stride() functions 2009-08-31 17:07:54 +02:00
Gael Guennebaud
27c9ecc50f fix copy/paste issue 2009-08-31 16:41:13 +02:00
Hauke Heibel
0a0a805569 Fixed a cast warning in scaleAndAddTo.
Fixed lazyness in umeyama.
Added a few missing casts.
2009-08-31 15:34:57 +02:00
Hauke Heibel
32a9aee286 Added MSVC guards to assignment operators. 2009-08-31 14:40:53 +02:00
Hauke Heibel
99bfab6dcf Removed redundant assignment operators. 2009-08-31 13:47:32 +02:00
Gael Guennebaud
9005eb0788 compilation fix in AmbiVector<int> 2009-08-31 09:32:46 +02:00
Gael Guennebaud
3705498721 add coeff(int,int), coeff(int) and value() functions to the inner product specialization 2009-08-26 00:24:22 +02:00
Thomas Capricelli
d0a5da95b1 fix installation for recently added files 2009-08-25 18:57:59 +02:00
Benoit Jacob
191d5275a7 modernize HouseholderQR too, uniformize all that stuff, update tests 2009-08-24 13:46:14 -04:00
Jitse Niesen
7e4bd70157 Fix comment which may cause latex to hang when generating docs 2009-08-24 18:01:18 +01:00
Gael Guennebaud
078a870a87 fix issue #43 2009-08-24 18:56:27 +02:00
Benoit Jacob
0eb142f559 bring the modern comfort also to ColPivotingHouseholderQR
+ some fixes in FullPivotingHouseholderQR
2009-08-24 11:11:41 -04:00
Benoit Jacob
3288e5157a finally, the correct way of dealing with zero matrices in solve() 2009-08-24 10:51:07 -04:00
Benoit Jacob
b8106e97b4 add logAbsDeterminant()
move log and exp functors from Array to Core
update documentation
2009-08-24 09:46:17 -04:00
Benoit Jacob
c9a307f330 give FullPivotingHouseholderQR all the modern comfort 2009-08-24 00:23:35 -04:00
Benoit Jacob
b37ab9b324 clarifications in LU::solve() and in LU documentation 2009-08-24 00:02:49 -04:00
Benoit Jacob
0926549659 fix bug: with complex matrices, the condition (ei_imag(c0)==RealScalar(0)) being wrong could bypass the other condition in the &&.
at least that's my explanation why the test_lu was often failing on complex matrices (it uses that via createRandomMatrixOfRank)
and why that's fixed by this diff.
also gcc 4.4 gave a warning about tailSqNorm potentially uninitialized
2009-08-24 00:02:22 -04:00
Benoit Jacob
d38624b1ad merge 2009-08-23 18:05:33 -04:00
Benoit Jacob
97bc1af1f1 add ColPivotingHouseholderQR
rename RRQR to fullPivotingHouseholderQR
2009-08-23 18:04:33 -04:00
Gael Guennebaud
47fda1f3b2 hm, forgot to conjugate the arguments in applyJacobiOnTheLeft 2009-08-24 00:01:02 +02:00
Gael Guennebaud
e86dbd5255 fix apply Jacobi for complexes and add documentation for some *Jacobi* functions 2009-08-23 23:49:44 +02:00
Benoit Jacob
7bedf5e9cb add initial, rough, full-pivoting RRQR decomposition
lots of room for improvement!
and add Gael a (c) line in Householder.h
2009-08-22 01:13:21 -04:00
Benoit Jacob
2f0b4e1abc fix compilation with gcc 4.1. Indeed the path for recent gcc doesn't work with gcc 4.1, and looking at the implementation of vector in g++ 4.1, it was exactly our fallback case, so use that. 2009-08-21 12:16:37 -04:00
Benoit Jacob
72b002eab9 work around internal compiler error with gcc 4.1 and 4.2, reported on the forum 2009-08-20 12:19:15 -04:00
Gael Guennebaud
d56be9c128 * make HessenbergDecomposition uses the Householder module
* bugfix in ei_blas_traits for .conjugate().conjugate()
2009-08-17 17:41:01 +02:00
Gael Guennebaud
ff0f005d4c change the make householder algorithm so that the remaining coefficient
is real, and make Tridiagonalization use it
2009-08-17 17:04:32 +02:00
Gael Guennebaud
e125c199bb add EIGEN_TRANSFORM_PLUGIN 2009-08-17 09:16:41 +02:00
Gael Guennebaud
737bed19c1 make HouseholderQR uses the Householder module 2009-08-16 19:22:15 +02:00
Gael Guennebaud
fc9480cbb3 bugfix in compute_matrix_flags, optimization in LU,
improve doc, and workaround aliasing detection in MatrixBase_eval snippet
(not very nice but I don't know how to do it in a better way)
2009-08-16 10:55:10 +02:00
Benoit Jacob
ee982709d3 in all decs, make the compute() methods return *this
(implements feature request #18)
2009-08-15 23:12:39 -04:00
Gael Guennebaud
65fe5f76fd rename back MayAliasBit to EvalBeforeAssigningBit 2009-08-16 00:14:05 +02:00
Gael Guennebaud
f5f2b222a3 make SVD reuses applyJacobi 2009-08-16 00:02:36 +02:00
Gael Guennebaud
044dd0c1dd revert previous change in Quaternion::setFromTwoVectors 2009-08-15 23:37:20 +02:00
Benoit Jacob
03c1e79f35 svd: sort in decreasing order, remove unused code 2009-08-15 19:20:48 -04:00
Gael Guennebaud
239ada95b7 add overloads of lazyAssign to detect common aliasing issue with
transpose and adjoint
2009-08-15 22:19:29 +02:00
Benoit Jacob
a3e6047c25 fix and improve docs 2009-08-15 15:29:44 -04:00
Gael Guennebaud
50c703f0c7 As proposed on the list:
- rename EvalBeforeAssignBit to MayAliasBit
- make .lazy() remove the MayAliasBit only, and mark it as deprecated
- add a NoAlias pseudo expression, and MatrixBase::noalias() function
Todo:
- we have to decide whether += and -= assume no aliasing by default ?
- once we agree on the API: update the Sparse module and the unit tests respectively.
2009-08-15 18:35:51 +02:00
Gael Guennebaud
13a8956188 bugfix in inner-product specialization,
compilation fix in stable norm,
optimize apply householder
2009-08-15 13:12:50 +02:00
Gael Guennebaud
7b60713e87 my previous fix was not very good 2009-08-15 11:52:50 +02:00
Gael Guennebaud
0da31a6e1d bugfix and compilation fix in ProductBase 2009-08-15 10:55:11 +02:00
Gael Guennebaud
bff4238d15 fix setFromTwoVectors because of the change in sorting of the the singular values 2009-08-15 10:24:27 +02:00
Gael Guennebaud
109a4f650b fix a couple of warnings 2009-08-15 10:20:01 +02:00
Benoit Jacob
fe4a86443f fix warning 2009-08-14 20:16:04 -04:00
Benoit Jacob
a5f820b873 forgot to update this 2009-08-14 20:03:14 -04:00
Benoit Jacob
2f74801ca4 as discussed on list: default to align cols, reorganize parameters accordingly so that the default corresponds to 0 flag,
and implement FullPrecision output (non-default).
2009-08-14 16:31:42 -04:00
Benoit Jacob
16abc0ba7f try to support 16 bit platforms... optimistic, but can't hurt 2009-08-14 15:49:14 -04:00
Benoit Jacob
22ae236d4e machine_epsilon -> epsilon as wrapper around numeric_traits 2009-08-14 15:12:32 -04:00
Gael Guennebaud
6373c3cd00 oops bis, I forgot that SelfAdjointEigneSolver directly called the selector... 2009-08-14 13:49:29 +02:00
Gael Guennebaud
8abec72259 oops forgot to remove the #include in Core 2009-08-14 09:49:33 +02:00
Gael Guennebaud
13e95f7f68 optimize "apply Jacobi" for small sizes, and move it to Jacobi.h 2009-08-14 00:17:14 +02:00
Benoit Jacob
f2536416da * remove EIGEN_DONT_INLINE that harm performance for small sizes
* normalize left Jacobi rotations to avoid having to swap rows
* set precision to 2*machine_epsilon instead of machine_epsilon, we lose 1 bit of precision
  but gain between 10% and 100% speed, plus reduce the risk that some day we hit a bad matrix
  where it's impossible to approach machine precision
2009-08-13 14:56:39 -04:00
Benoit Jacob
76a3089a43 oops, don't set the precision to -1 !! 2009-08-13 09:56:53 -04:00
Benoit Jacob
13b191d94b apply Koldo's workaround for MSVC bug 2009-08-13 09:53:47 -04:00
Gael Guennebaud
1b257a7620 add an optimized "apply in place a rotation in the plane",
and make Jacobi and SelfAdjointEigenSolver use it
=> ~ x1.75 speedup for JacobiSVD and x2 for SelfAdjointEigenSolver
2009-08-13 11:42:02 +02:00
Benoit Jacob
1d80f561ad apply change discussed on the list :
* new default precision "-1" means use the current stream precision
* otherwise, save and restore the stream precision
2009-08-13 22:50:55 -04:00
Benoit Jacob
99802094e4 do without an empirical homemade formula that i wasn't comfortable about...
turns out it's not needed anymore and removing it seems to only increase the precision
2009-08-12 18:30:37 -04:00
Benoit Jacob
2b618a2c16 make jacobi SVD more robust after experimenting with very nasty matrices...
it turns out to be better to repeat the jacobi steps on a given (p,q) pair until it
is diagonal to machine precision, before going to the next (p,q) pair. it's also
an optimization as experiments show that in a majority of cases this allows to find out
that the (p,q) pair is already diagonal to machine precision.
2009-08-12 18:23:39 -04:00
Benoit Jacob
309d540d4a add parentheses; hopefully this solves Koldos MSVC compilation issue... 2009-08-12 10:14:15 -04:00
Benoit Jacob
22d65d47d0 finally, the good approach was two-sided Jacobi. Indeed, it allows
to guarantee the precision of the output, which is very valuable.
Here, we guarantee that the diagonal matrix returned by the SVD is
actually diagonal, to machine precision.

Performance isn't bad at all at 50% of the current householder SVD
performance for a 200x200 matrix (no vectorization) and we have
lots of room for improvement.
2009-08-12 02:35:07 -04:00
Benoit Jacob
ce033ebdfe add EIGEN_DEBUG_VAR 2009-08-11 16:12:34 -04:00
Gael Guennebaud
afbd73b5cd overload operartor* with a ProductBase such that "scalar * (mat * mat)" is optimized
as one could naturally expect
2009-08-11 15:15:06 +02:00
Gael Guennebaud
a4f6642518 fix issue #36 (missing return *this in Rotation2D 2009-08-11 15:11:47 +02:00
Gael Guennebaud
ea884e6f48 remove #include Bidiagonalization, and add missing ";" 2009-08-11 15:08:03 +02:00
Gael Guennebaud
35b4077a5d merge 2009-08-09 23:11:25 +02:00
Gael Guennebaud
ef55e7f4ce make custom asm directive volatile 2009-08-09 23:09:46 +02:00
Benoit Jacob
216ee335ac LinearVectorization: If the destination isn't aligned,
we have to do runtime checks and we don't unroll, so it's only good for large enough sizes
2009-08-09 22:19:12 +02:00
Benoit Jacob
1f1705868b now you can #define EIGEN_DEBUG_ASSIGN, and all the values in ei_assign_traits are printed 2009-08-09 21:35:13 +02:00
Benoit Jacob
527557672a disable the assembly for fast unaligned stores. indeed, there is a strange bug that is triggered by this code:
#include<Eigen/Core>

int main()
{
  Eigen::Matrix4f m;
  m <<1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;
  m.col(0).swap(m.col(1));
  std::cout << m << std::endl;
}

when the fast unaligned stores are used, the column is copied instead of being swapped.
2009-08-09 20:49:55 +02:00
Benoit Jacob
8e08680119 don't depend on uninitialized value 2009-08-09 17:18:42 +02:00
Benoit Jacob
3ed83fa681 * add Jacobi transformations
* add Jacobi (Hestenes) SVD decomposition for square matrices
* add function for trivial Householder
2009-08-09 16:58:13 +02:00
Gael Guennebaud
fe813911f2 make LU::solve() not to crash when rank=0 2009-08-09 00:06:53 +02:00
Benoit Jacob
5f8d58f36a fix bug in sorting of singular values 2009-08-09 00:05:38 +02:00
Gael Guennebaud
f5e1c896c7 replace custom rank one update in LU by an expression 2009-08-08 00:01:43 +02:00
Gael Guennebaud
d1dc088ef0 * implement a second level of micro blocking (faster for small sizes)
* workaround GCC bad implementation of _mm_set1_p*
2009-08-07 11:09:34 +02:00
Gael Guennebaud
543a785756 Fix compilation in sparse module 2009-08-06 17:28:49 +02:00
Gael Guennebaud
2707a6b87c fix determinant in PartialLU 2009-08-06 17:28:31 +02:00
Gael Guennebaud
1d1e4884da oops, one more bug fix in homogeneous 2009-08-06 16:56:10 +02:00
Gael Guennebaud
9822493aaf fixes in determinant and homogeneous 2009-08-06 16:54:55 +02:00
Gael Guennebaud
3ac01b1400 compilation fix in EigenSolver,
bugfix in PartialLU
2009-08-06 16:41:54 +02:00
Gael Guennebaud
e82e30862a typo 2009-08-06 15:04:42 +02:00
Gael Guennebaud
03febf00a0 fix VS compilation issue in MapBase::operator+= and -= 2009-08-06 15:03:37 +02:00
Gael Guennebaud
2e46e9f2b4 shame on me 2009-08-06 14:57:38 +02:00
Gael Guennebaud
d34c5ef509 fix my bad fix of Hauke's fix ;) 2009-08-06 14:54:25 +02:00
Gael Guennebaud
1d4fea48b5 fix a couple of compilations issues 2009-08-06 14:10:02 +02:00
Hauke Heibel
c2861dd41a fixed inversion for AffineCompact matrices 2009-08-06 12:25:18 +02:00
Gael Guennebaud
56d00779db more product refactoring 2009-08-06 12:20:02 +02:00
Hauke Heibel
6b2ab13ac5 fix vs.net compilation issue 2009-08-06 11:40:25 +02:00
Hauke Heibel
8163757cf0 fix vs.net compilation issue 2009-08-06 11:27:25 +02:00
Gael Guennebaud
fa55cf5ce7 fix compilation and segfault issues 2009-08-06 11:19:36 +02:00
Gael Guennebaud
b9b17ea5a5 add the missing Affine Transform * set of column vectors products... 2009-08-06 11:02:03 +02:00
Benoit Jacob
0744638b6f remove remnant of MultiplierBase 2009-08-06 10:35:13 +02:00
Gael Guennebaud
84a7659bef implement the missing outer product,
and attempt to workaround a gcc internal error
2009-08-05 17:39:11 +02:00
Gael Guennebaud
88147e0a91 big refactoring in Product.h:
- all specialized products now inherits ProductBase
- the default product evaluated by Assign is still here,
  but it is currently enabled for small fixed sizes only
- => this significantly speed up compilation for large matrices
- I left the OuterProduct specialization empty as an exercise...
2009-08-05 15:23:35 +02:00
Benoit Jacob
014c581a5b fix assertions, improve docs.
we never assert on conditions that depend on the result of a computation!!
also the assertion that rank>0 amounts to matrix!=0 which we have to leave under the responsibility of the user.
2009-08-05 10:15:28 +02:00
Gael Guennebaud
7d607048a9 implement a ProductBase class and, as a proof of concept, update TriangularProduct
and SelfAdjointMatrixProduct to take advantage of it => fewer LOC
2009-08-04 16:54:17 +02:00
Gael Guennebaud
f3a6bc48c4 fix a couple of compilation issue due to the removal of MultiplierBase 2009-08-04 13:16:40 +02:00
Gael Guennebaud
2089a263f8 merge 2009-08-04 11:31:25 +02:00
Gael Guennebaud
4bec101470 implement two levels of blocking in PartialLU => high speedup 2009-08-04 11:28:02 +02:00
Benoit Jacob
4436a4d68c use explicit Block/VectorBlock xprs to make sure that compile-time known sizes are used 2009-08-04 00:27:58 +02:00
Benoit Jacob
523cdedf58 make the dot product linear in the second variable, not the first variable 2009-08-03 17:20:45 +02:00
Gael Guennebaud
912da9fade merge with special_matrix branch 2009-08-03 16:17:32 +02:00
Gael Guennebaud
a8f943127c merge 2009-08-03 16:11:30 +02:00
Benoit Jacob
d10c710b15 add new Householder module 2009-08-03 16:06:57 +02:00
Gael Guennebaud
3cf5bb31f6 * Bye bye MultiplierBase, extend a bit AnyMatrixBase to allow =, +=, and -=
* This probably makes ReturnByValue needless
2009-08-03 16:05:15 +02:00
Benoit Jacob
66ee2044ce small fixes 2009-08-03 16:05:07 +02:00
Benoit Jacob
3cde9c0e35 apply Gael's idea for auto transpose in mixed fixed/dynamic case 2009-08-03 16:04:15 +02:00
Gael Guennebaud
ce1dc1ab16 implements a blocked version of PartialLU 2009-08-03 12:11:18 +02:00
Gael Guennebaud
0103de8512 bugfix in trsm 2009-08-02 15:32:43 +02:00
Gael Guennebaud
48fc64458c add blocked LLT, and bugfix in trsm asserts 2009-08-01 23:42:51 +02:00
Gael Guennebaud
18429156a1 add selfadjointView from a trinagularView 2009-07-31 17:35:55 +02:00
Gael Guennebaud
2796bcabb1 some cleaning 2009-07-31 17:35:20 +02:00
Gael Guennebaud
a156f5a869 faster trsm kernel and fix a couple of issues 2009-07-31 13:18:19 +02:00
Gael Guennebaud
21f686846b s/std::atan2/ei_atan2 2009-07-31 10:08:23 +02:00
Manuel Yguel
ae5e26a363 add missing ei_atan2 without painfull warnings 2009-07-31 09:21:31 +02:00
Gael Guennebaud
2e9f7f80bf compilation fixes for sun CC 2009-07-31 10:04:34 +02:00
Benoit Jacob
d8bfd151d1 forward-port Anthony Truchet's changeset 8eab0bccbf 2009-07-30 16:05:38 +02:00
Gael Guennebaud
ff20a2ba94 add explicit "on the right" triangular solving,
=> no temporary when the rhs/unknows is row major
2009-07-30 16:03:06 +02:00
Gael Guennebaud
62d9b9b7b5 fix typo 2009-07-29 09:26:20 +02:00
Gael Guennebaud
864171df5c fix a couple of issues related to recent products 2009-07-28 18:11:30 +02:00
Gael Guennebaud
1ba35248e9 synch with main branch 2009-07-28 17:37:22 +02:00
Gael Guennebaud
54804eb626 synch with main branch 2009-07-28 17:35:07 +02:00
Gael Guennebaud
264fe82c65 add a debug mechanism to compute the number of intermediate evaluations (only for dynamic size) 2009-07-28 17:13:13 +02:00
Gael Guennebaud
7ed7ec64b5 improve the expression analyzer to bypass Transpose expression 2009-07-28 14:02:12 +02:00
Gael Guennebaud
5f3606bce9 bug fix in inverse for 1x1 matrix,
some compilation fixes in sparse_solvers
2009-07-27 18:09:56 +02:00
Gael Guennebaud
94cc30180e compilation fixes 2009-07-27 13:50:23 +02:00
Gael Guennebaud
0590c18555 various compilation and bug fixes in selfadjoint stuff 2009-07-27 13:17:39 +02:00
Gael Guennebaud
b5e4064289 cleaning and fix a perf issue 2009-07-27 12:13:53 +02:00
Gael Guennebaud
f95b77be62 trmm is now fully working and available via TriangularView::operator* 2009-07-27 11:42:54 +02:00
Gael Guennebaud
6aba84719d trmm is now working in all storage order configurations 2009-07-27 10:27:01 +02:00
Gael Guennebaud
1d4d9a37fd some cleaning 2009-07-26 13:53:24 +02:00
Gael Guennebaud
f3fde74695 finalize trsm: works in all situations, and it is now used by solve() and solveInPlace() 2009-07-26 13:01:37 +02:00
Gael Guennebaud
282e18da49 ok, now trsm works very well for upper triangular matrices
TODO: link it with the meta triangular_solve_selector and handle
the case where the rhs is row major by copying it to a col-major
temporary + handle right solving: X = B * M^-1
2009-07-26 00:49:17 +02:00
Gael Guennebaud
f4112dcff3 The new trsm is working very very well (read very fast) for
lower triangular matrix and row or col major lhs.
TODO: handle upper triangular and row major rhs cases
2009-07-25 21:41:01 +02:00
Gael Guennebaud
35927e78c2 add WIP trsm 2009-07-24 16:21:52 +02:00
Gael Guennebaud
c6d06c22ac some cleaning 2009-07-24 10:53:31 +02:00
Gael Guennebaud
6076173f0b add a simplified version of the sybb kernel built on top of gebp 2009-07-24 10:08:21 +02:00
Gael Guennebaud
82c5438c95 split and add unit tests for symm and syrk,
the .rank*update() functions now returns a reference to *this
2009-07-23 21:22:51 +02:00
Gael Guennebaud
b67abe22b3 oops,, update SYRK so that the rhs can be non-square² 2009-07-23 20:56:04 +02:00
Gael Guennebaud
a81388fae9 Implement efficient sefladjoint product (aka SYRK) : C += alpha * U U^T
It is currently available via SelfAdjointView::rankKupdate.
TODO: allows to write SelfAdjointView += u * u.adjoint()
2009-07-23 19:01:20 +02:00
Gael Guennebaud
713c92140c improve SYMV it is now faster and ready for use 2009-07-23 14:20:45 +02:00
Gael Guennebaud
eee14846e3 formating 2009-07-23 10:19:58 +02:00
Gael Guennebaud
ddb3ac98a2 addd matrix * self adjoint high level API 2009-07-23 10:05:38 +02:00
Hauke Heibel
8d2cd744b0 Added an explicit cast from int to bool to suppress MSVC warnings. 2009-07-23 00:11:25 +02:00
Gael Guennebaud
f696efc00e bugfix in SYMM 2009-07-22 23:48:42 +02:00
Gael Guennebaud
0cb4f32e12 implement high level API for SYMM and fix a couple of bugs related to complex 2009-07-22 23:12:22 +02:00
Gael Guennebaud
e7f8e939e2 * GEMM enhencement: no need to pre-transpose the rhs
=> faster a * b.transpose() product
  => this also fix a bug in a so far untested situation
* SYMM is now ready for use => still have to write the high level
  stuff to convert natural expressions into a call to SYMM
2009-07-22 18:04:16 +02:00
Gael Guennebaud
d6475ea390 more refactoring in the level3 products 2009-07-22 11:54:58 +02:00
Gael Guennebaud
d6627d540e * refactoring of the matrix product into multiple small kernels
* started an efficient selfadjoint matrix * general matrix product
  based on the generic kernels ( => need a very little LOC)
2009-07-21 16:58:35 +02:00
Gael Guennebaud
afa8f2ca95 * various fixes related to sub diagonals and band matrix
* allows 0 sized objects in Block/Map
2009-07-21 11:19:52 +02:00
Gael Guennebaud
a012aecbc4 bugfix in SVD 2009-07-20 13:44:52 +02:00
Gael Guennebaud
4375c043ac minor compilation fixes for Sun CC and ICC 2009-07-20 13:27:41 +02:00
Gael Guennebaud
4c85fa8c73 compilation fix (sun CC) 2009-07-20 10:57:31 +02:00
Gael Guennebaud
c10b919edb compilation fix 2009-07-20 10:56:03 +02:00
Gael Guennebaud
b3ad796d40 bugfix in operator*= (matrix product) 2009-07-20 10:44:07 +02:00
Gael Guennebaud
a551107cce bugfix for a = a * b; when a has to be resized 2009-07-20 10:35:47 +02:00
Gael Guennebaud
32b08ac971 re-implement stableNorm using a homemade blocky and
vectorization friendly algorithm (slow if no vectorization)
2009-07-17 16:22:39 +02:00
Gael Guennebaud
525da6a464 bugfix in blueNorm 2009-07-16 14:20:36 +02:00
Gael Guennebaud
34490f1493 * bugfixes in Product, and test/product_selfadjoint
* speed up in the extraction of the matrix Q in Tridiagonalization
2009-07-16 00:03:17 +02:00
Gael Guennebaud
97c9445c60 synch with main devel branch 2009-07-15 19:54:31 +02:00
Gael Guennebaud
079fa81d84 add a TridiagonalMatrix wrapper arround BandMatrix, and extend this latter 2009-07-15 19:53:08 +02:00
Gael Guennebaud
4f792583c7 add BandMatrix::col() 2009-07-15 18:00:11 +02:00
Gael Guennebaud
df6561a73f change the implementation of BandMatrix to follow the BLAS/LAPACK storage scheme 2009-07-15 17:00:49 +02:00
Gael Guennebaud
1578421ed1 fix issue #25 : the problem was that we assumed Dynamic was a multiple of a packet size
(also disable the test of blueNorm)
2009-07-15 14:20:45 +02:00
Gael Guennebaud
587029a612 started an implementation of BandMatrix: at least the read/write access
to the main/sub/super diagonals seems to work well.
2009-07-14 23:27:37 +02:00
Gael Guennebaud
8120a5cecd synch with main devel branch 2009-07-14 23:06:25 +02:00
Gael Guennebaud
7a9519a9be fix typo in blue norm 2009-07-14 23:00:53 +02:00
Gael Guennebaud
279cedc1ce some cleaning/renaming is Triangular/SelfadjointView 2009-07-14 22:38:21 +02:00
Gael Guennebaud
f5d2317b12 add a blueNorm() function implementing the Blues's stable norm
algorithm. it is currently provided for experimentation
purpose only.
2009-07-13 21:14:47 +02:00
Gael Guennebaud
ddbaaebf9e one more fix of the previous commit (forgot to update ei_must_nest_by_value) 2009-07-13 15:27:01 +02:00
Gael Guennebaud
bd506d837c fix typo in previous commit 2009-07-13 15:21:32 +02:00
Gael Guennebaud
1e7b1a8a85 add a SparseNestByValue expression and fix issue in sparse adjoint evaluation 2009-07-13 14:55:03 +02:00
Gael Guennebaud
a2cf7ba955 add triangular * vector product 2009-07-13 13:17:55 +02:00
Gael Guennebaud
a2087cd7a3 Add an efficient rank2 update function (like the level2 blas xSYR2 routine).
Note that it is already used in Tridiagonalization.
2009-07-11 21:14:59 +02:00
Gael Guennebaud
ab17f92728 more sun studio fixes 2009-07-10 16:27:01 +02:00
Gael Guennebaud
ec5c608aa3 Set of fixes and workaround to make sun studio more happy.
Still remains the problem of alignment and vectorization.
2009-07-10 16:10:03 +02:00
Gael Guennebaud
b47dea8b7a add a meta unroller for the triangular solver (only for vectors as rhs) 2009-07-10 11:30:46 +02:00
Gael Guennebaud
1a1b2e9f27 finally directly calling the low-level products is faster 2009-07-10 10:41:26 +02:00
Gael Guennebaud
1c52985aa7 merge 2009-07-10 08:21:57 +02:00
Gael Guennebaud
629e083d81 slight change in the comparison to -1 2009-07-10 08:21:20 +02:00
Gael Guennebaud
8885d56928 commit woking versions of triangular solvers naturally
handling conjuagted expression. still have to bench whether it
is faster (runtime and compile time) to directly call the
cache friendly functions, whence all the commented piece of code...
2009-07-09 23:59:18 +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
5ed6ce90d3 started to catch scalar multiple and conjugate xpr in Product 2009-07-07 16:55:51 +02:00
Gael Guennebaud
ea23f36c78 * change the nesting order of adjoint_return_type to
1 - make it easier to catch conjugate expressions
 2 - make sure there is no unecessary copy (we had NestByValue<Derived> which seems to be very bad)
* update eigensolver wrt recent changes
2009-07-07 15:56:13 +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
544888e342 add a generic mechanism to copy a special matrix to a dense matrix so that
we don't need to add other specialization of MatrixBase::operator=, Matrix::=,
and Matrix::Matrix(...)
2009-07-07 09:05:20 +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
Benoit Jacob
889726bf7c add matrixQR() method exposing the storage. that's where the householder thing impacts the API. 2009-07-06 17:24:11 +02:00
Benoit Jacob
e057beee4e fix some search-and-replace damage 2009-07-06 17:20:07 +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
Gael Guennebaud
f84bd3e7b1 include the fixes of the third edition 2009-07-06 15:01:30 +02:00
Gael Guennebaud
0c2232e5d9 quick reimplementation of SVD from the numeral recipes book:
this is still not Eigen style code but at least it works for
n>m and it is more accurate than the JAMA based version. (I needed
it now, this is why I did that)
2009-07-06 13:47:41 +02:00
Gael Guennebaud
0cd158820c switch from eigensolver to SVD which seems to be more accurate with float 2009-07-06 11:15:38 +02:00
Gael Guennebaud
90f1e24579 significantly improve the accuracy of setFromTwoVectors (fixes #21) 2009-07-06 10:35:20 +02:00
Gael Guennebaud
ecc4f07af5 fix doc of Quaternion::setFromTwoVectors 2009-07-06 09:17:25 +02:00
Gael Guennebaud
c6f610093b add a VectorBlock expr as a specialization of Block 2009-07-05 11:33:55 +02:00
Gael Guennebaud
eec334c604 fixes a segfault 2009-07-05 10:48:57 +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
Gael Guennebaud
d457ec5810 fix #20: SVD::solve() now resize the result 2009-07-04 09:28:11 +02: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
Manuel Yguel
126a031a39 computeInverseWithCheck method added to matrix base (specialization for 1D to 4D) 2009-06-29 20:47:37 +02:00
Benoit Jacob
632cb7a4a1 patch by Myguel from the forum: fix documentation 2009-06-29 19:26:20 +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
bf91003d37 FreeBSD: determine precisely when malloc is 16-byte aligned 2009-06-29 00:08:34 +02:00
Benoit Jacob
5eabf2b75d double precision() : change to 1e-12 instead of 1e-11 (as discussed several times on the list) 2009-06-29 00:00:29 +02:00
Benoit Jacob
6809f7b1cd new implementation of diagonal matrices and diagonal matrix expressions 2009-06-28 21:27:37 +02:00
Benoit Jacob
fc9000f23e only disable the inline ASM if we're NEITHER gcc nor icc. right ?? 2009-06-26 05:32:21 +02:00
Benoit Jacob
6ccb97620a patch by Patrick Mihelich: use empty struct + anonymous namespace for NoChange 2009-06-25 03:33:47 +02:00