Commit Graph

8895 Commits

Author SHA1 Message Date
Gael Guennebaud
82c3cea1d5 * refactoring of Product:
* use ProductReturnType<>::Type to get the correct Product xpr type
  * Product is no longer instanciated for xpr types which are evaluated
  * vectorization of "a.transpose() * b" for the normal product (small and fixed-size matrix)
  * some cleanning
* removed ArrayBase
2008-06-19 17:33:57 +00:00
Gael Guennebaud
5dbfed1902 fix two bugs dicovered by the previous commit. 2008-06-16 16:39:58 +00:00
Benoit Jacob
bb1f4e44f1 * Block: row and column expressions in the inner direction
now have the Like1D flag.

* Big renaming:
  packetCoeff ---> packet
  VectorizableBit ---> PacketAccessBit
  Like1DArrayBit ---> LinearAccessBit
2008-06-16 14:54:31 +00:00
Benoit Jacob
9857764ae7 aaargh. 2008-06-16 11:20:29 +00:00
Benoit Jacob
478bfaf228 fix bug in computation of unrolling limit: div instead of mul 2008-06-16 11:18:59 +00:00
Benoit Jacob
c905b31b42 * Big rework of Assign.h:
** Much better organization
** Fix a few bugs
** Add the ability to unroll only the inner loop
** Add an unrolled path to the Like1D vectorization. Not well tested.
** Add placeholder for sliced vectorization. Unimplemented.

* Rework of corrected_flags:
** improve rules determining vectorizability
** for vectors, the storage-order is indifferent, so we tweak it
   to allow vectorization of row-vectors.

* fix compilation in benchmark, and a warning in Transpose.
2008-06-16 10:49:44 +00:00
Gael Guennebaud
bc0c7c57ed Added an extensible mechanism to support any kind of rotation
representation in Transform via the template static class
ToRotationMatrix.
Added a lightweight AngleAxis class (similar to Rotation2D).
2008-06-15 17:22:41 +00:00
Gael Guennebaud
0ee6b08128 * split Product to a DiagonalProduct template specialization
to optimize matrix-diag and diag-matrix products without
  making Product over complicated.
* compilation fixes in Tridiagonalization and HessenbergDecomposition
  in the case of 2x2 matrices.
* added an Orientation2D small class with similar interface than Quaternion
  (used by Transform to handle 2D and 3D orientations seamlessly)
* added a couple of features in Transform.
2008-06-15 11:54:18 +00:00
Gael Guennebaud
fbbd8afe30 Started a Transform class in the Geometry module to represent
homography.
Fix indentation in Quaternion.h
2008-06-15 08:33:44 +00:00
Gael Guennebaud
4af7089ab8 * Added a generalized eigen solver for the selfadjoint case.
(as new members to SelfAdjointEigenSolver)
  The QR module now depends on Cholesky.
* Fix Transpose to correctly preserve the *TriangularBit.
2008-06-14 19:42:12 +00:00
Gael Guennebaud
f07f907810 Add QR and Cholesky module instantiations in the lib.
To try it with the unit tests set the cmake variable TEST_LIB to ON.
2008-06-14 13:02:41 +00:00
Benoit Jacob
53289a8b64 * even though the _Flags default to the corrected value, still correct
them in the ei_traits, so that they're guaranteed even if the user
  specified his own non-default flags (like before).

  Measured to not make compilation any slower.
2008-06-13 08:09:48 +00:00
Benoit Jacob
c90c77051f * make the _Flags template parameter of Matrix default to the corrected
flags. This ensures that unless explicitly messed up otherwise,
  a Matrix type is equal to its own Eval type. This seriously reduces
  the number of types instantiated. Measured +13% compile speed, -7%
  binary size.

* Improve doc of Matrix template parameters.
2008-06-13 07:53:45 +00:00
Gael Guennebaud
e3fac69f19 Added a Hessenberg decomposition class for both real and complex matrices.
This is the first step towards a non-selfadjoint eigen solver.
Notes:
 - We might consider merging Tridiagonalization and Hessenberg toghether ?
 - Or we could factorize some code into a Householder class (could also be shared with QR)
2008-06-08 15:03:23 +00:00
Gael Guennebaud
4dd57b585d * rewrite of the QR decomposition:
- works for complex
  - allows direct access to the matrix R
* removed the scale by the matrix dimensions in MatrixBase::isMuchSmallerThan(scalar)
2008-06-07 22:47:11 +00:00
Gael Guennebaud
eb7b7b2cfc * remove Cross product expression: MatrixBase::cross() now returns a temporary
which is even better optimized by the compiler.
* Quaternion no longer inherits MatrixBase. Instead it stores the coefficients
  using a Matrix<> and provides only relevant methods.
2008-06-07 13:18:29 +00:00
Gael Guennebaud
6998037930 * move some compile time "if" to their respective unroller (assign and dot)
* fix a couple of compilation issues when unrolling is disabled
* reduce default unrolling limit to a more reasonable value
2008-06-07 01:07:48 +00:00
Gael Guennebaud
a172385720 Updated fuzzy comparisons to use L2 norm as all my experiments
tends to show L2 norm works very well here.
(the legacy implementation is still available via a preprocessor token
 to allow further experiments if needed...)
2008-06-06 18:37:53 +00:00
Gael Guennebaud
8769bfd9aa fix a compilation issue in non debug mode 2008-06-06 14:11:26 +00:00
Benoit Jacob
869394ee8b fix some compile errors with gcc 4.3, some warnings, some documentation 2008-06-06 13:10:00 +00:00
Gael Guennebaud
2126baf9dc add an optimized path for the tridiagonalization of a 3x3 matrix.
(useful for plane fitting, and covariance analysis of 3D data)
2008-06-04 13:41:32 +00:00
Gael Guennebaud
48262b9734 added a static assertion mechanism
(see notes in Core/util/StaticAssert.h for details)
2008-06-04 11:16:11 +00:00
Gael Guennebaud
60726f91a9 hack to to make the nomalloc unit test compiles with -pedantic 2008-06-04 10:15:48 +00:00
Gael Guennebaud
42ad9c4352 update of the eigeinsolver unit test to check complex 2008-06-03 18:04:36 +00:00
Gael Guennebaud
a0cff1a295 fix eigenvectors computations :) 2008-06-03 18:03:55 +00:00
Gael Guennebaud
915587d03d * add CommaInitializer::finished to allow the use of (Matrix3() << v0, v1, v2).finished()
as an argument of a function. Other possibilities for the name could be "end" or "matrix" ??
* various update in Quaternion, in particular I added a lot of FIXME about the API options,
  these have to be discussed and fixed.
2008-06-03 15:50:09 +00:00
Gael Guennebaud
196f38f5db improved Quaternion class:
- Euler angles and angle axis conversions,
 - stable spherical interpolation
 - documentation
 - update the respective unit test
2008-06-03 13:43:29 +00:00
Gael Guennebaud
bcb32839c2 fix building of examples 2008-06-03 09:43:59 +00:00
Gael Guennebaud
a9cf229e15 add a geometry unit test and fix a couple of typo in Quaternion.h 2008-06-03 07:32:12 +00:00
Benoit Jacob
8de4d92b70 - get the doc of the enums in MatrixBase right
- get the doc of the flags in Constants right
- finally give up with SEPARATE_MEMBER_PAGES: it triggers too big
  Doxygen bugs, and produces too many small pages. So we have one
  huge page for MatrixBase at currently 300kb and going up, so the
  solution especially for users with low bandwidth will be to provide
  an archive of the html documentation.
2008-06-03 02:06:18 +00:00
Gael Guennebaud
366971bea4 * start of the Geometry module with a cross product and quaternion expressions
(haven't tried them yet)
* applied the meta selector rule to MatrixBase::swap()
2008-06-02 22:58:36 +00:00
Benoit Jacob
75de41a00b big changes in Doxygen configuration; work around bug with doxygen parsing of
initialized enum values showing the last word the initializer instead of the actual
enum value's name; add some more docs.
2008-06-02 20:08:37 +00:00
Benoit Jacob
ac88feebb7 work around Doxygen bug triggered by r814874, which caused many classes to disappear
from the docs.
2008-06-02 19:29:23 +00:00
Benoit Jacob
6209bbe286 doc improvements: fix linking in Mainpage.dox, improved Doxyfile.in 2008-06-02 18:27:37 +00:00
Gael Guennebaud
f2ebbee274 added unit tests for sizeof and dynamic memory allocation 2008-06-02 14:54:52 +00:00
Gael Guennebaud
54ae2ac7e8 Added the computation of eigen vectors in the symmetric eigen solver.
However the eigen vectors are not correct yet, but I really cannot find the
problem.
2008-06-02 12:52:08 +00:00
Benoit Jacob
3b0523041a since m*m.adjoint() is positive, so are its eigenvalues, so no need for
cwiseAbs()
2008-06-02 04:45:02 +00:00
Benoit Jacob
0444e3601a - add MatrixBase::eigenvalues() convenience method
- add MatrixBase::matrixNorm(); in the non-selfadjoint case, we reduce to the
  selfadjoint case by using the "C*-identity" a.k.a.
	norm of x = sqrt(norm of x * x.adjoint())
2008-06-02 04:42:45 +00:00
Benoit Jacob
92b7e2d6a1 fix a couple of issues making the eigensolver test compile and run without aborting
on an assert. Had to fix a stupid bug in Block -- very strange we hadn't hit it
before.

However the test still fails.
2008-06-02 02:06:33 +00:00
Gael Guennebaud
001b01a290 Rewrite from scratch of the eigen solver for symmetric matrices
which now supports selfadjoint matrix. The implementation follows
Golub's famous book.
2008-06-02 00:30:26 +00:00
Gael Guennebaud
06752b2b77 * added a Tridiagonalization class for selfadjoint matrices
* added MatrixBase::real()
* added the ability to extract a selfadjoint matrix from the
  lower or upper part of a matrix, e.g.:
    m.extract<Upper|SelfAdjoint>()
  will ignore the strict lower part and return a selfadjoint.
  This is compatible with ZeroDiag and UnitDiag.
2008-06-01 17:20:18 +00:00
Benoit Jacob
dc5fd8dfff meagre outcome for so much time spent!
* fix inverse() bug discovered by Gael's test
* fix warnings introduced by the new Diagonal stuff
* update Doxyfile to v1.5.6
2008-06-01 03:36:49 +00:00
Gael Guennebaud
d5cbb1d002 added a unit test for Inverse
discovered that m1 == m1.inverse().inverse() fails though
m1.inverse()*m1 == I
2008-05-31 23:44:11 +00:00
Gael Guennebaud
64169389ed added an *optional* Eigen2 dynamic library.
it allows the possiblity to save some compilation time by linking to it
*and* defining the token EIGEN_EXTERN_INSTANCIATIONS
2008-05-31 23:21:49 +00:00
Gael Guennebaud
fcf4457b78 added optimized matrix times diagonal matrix product via Diagonal flag shortcut. 2008-05-31 21:35:11 +00:00
Gael Guennebaud
310f7aa096 moved purely "array" related stuff to a new module Array.
This include:
 - cwise Pow,Sin,Cos,Exp...
 - cwise Greater and other comparison operators
 - .any(), .all() and partial reduction
 - random
2008-05-31 18:11:48 +00:00
Gael Guennebaud
a2f71f9d7e updated EigenSolver to use .coeff / .coeffRef 2008-05-31 16:31:10 +00:00
Gael Guennebaud
c9fb248c36 simply a bit the basic product moving dynamic loops
to the corresponding special case of the unrollers.
the latter ones are therefore re-named *product_impl.
2008-05-31 15:06:26 +00:00
Gael Guennebaud
f5e599e489 * replace compile-time-if by meta-selector in Assign.h
as it speed up compilation.
* fix minor typo introduced in the previous commit
2008-05-31 14:42:07 +00:00
Gael Guennebaud
e2ac5d244e Added ArrayBit to get the ability to manipulate a Matrix like a simple scalar.
In particular this flag changes the behavior of operator* to a coeff wise product.
2008-05-29 22:33:07 +00:00