Commit Graph

376 Commits

Author SHA1 Message Date
Gael Guennebaud
765219aa51 Big API change in Cholesky module:
* rename Cholesky to LLT
 * rename CholeskyWithoutSquareRoot to LDLT
 * rename MatrixBase::cholesky() to llt()
 * rename MatrixBase::choleskyNoSqrt() to ldlt()
 * make {LLT,LDLT}::solve() API consistent with other modules

Note that we are going to keep a source compatibility untill the next beta release.
E.g., the "old" Cholesky* classes, etc are still available for some time.
To be clear, Eigen beta2 should be (hopefully) source compatible with beta1,
and so beta2 will contain all the deprecated API of beta1. Those features marked
as deprecated will be removed in beta3 (or in the final 2.0 if there is no beta 3 !).

Also includes various updated in sparse Cholesky.
2008-10-13 15:53:27 +00:00
Gael Guennebaud
e2bd8623f8 Solve the issue found by Timothy in solveTriangular:
=> row-major rhs are now evaluated to a column-major
     temporary before the computations.
Add solveInPlace in Cholesky*
2008-10-13 13:14:43 +00:00
Scott Wheeler
537a0e0a52 fix typos 2008-10-12 16:09:12 +00:00
Scott Wheeler
e80d6a95d9 note that norm2() is *not* an l2 norm as it is in other APIs 2008-10-11 21:01:59 +00:00
Urs Wolfer
8466244faa SVN_SILENT pendantic 2008-10-11 17:52:45 +00:00
Scott Wheeler
b46c327133 Clear up the docs some. I'd also suggest making Dynamic the default template parameter for matrices. 2008-10-11 08:43:18 +00:00
Benoit Jacob
4e502dd6b0 very little fixes: cast literals to Scalar, rephrase some doc, add some const (maybe completely
useless but at least doesn't hurt)
2008-10-06 22:10:36 +00:00
Gael Guennebaud
22507fa645 Sparse module: refactoring of the cholesky factorization,
now the backends are well separated from the default impl, etc.
2008-10-05 20:19:47 +00:00
Gael Guennebaud
b8fc1edb2c Sparse module: enable support for incomplete cholesky factorization in CHOLMOD backend. 2008-10-05 13:45:43 +00:00
Gael Guennebaud
3c155ab073 Sparse module: removed some extra copies using markAsRValue() 2008-10-05 13:39:49 +00:00
Gael Guennebaud
b730c6f57d Sparse module: add experimental support for TAUCS and CHOLMOD with:
* bidirectionnal mapping
 * full cholesky factorization
2008-10-05 13:38:38 +00:00
Gael Guennebaud
98d3c0a413 Cleaned a bit the sparse cholesky code 2008-10-04 14:24:15 +00:00
Gael Guennebaud
068ff3370d Sparse module:
* several fixes (transpose, matrix product, etc...)
 * Added a basic cholesky factorization
 * Added a low level hybrid dense/sparse vector class
   to help writing code involving intensive read/write
   in a fixed vector. It is currently used to implement
   the matrix product itself as well as in the Cholesky
   factorization.
2008-10-04 14:23:00 +00:00
Gael Guennebaud
1fc503e3ce add EigenSolver::eigenvectors() method for non symmetric matrices.
However, for matrices larger than 5, it seems there is constantly a quite large error for a very
few coefficients. I don't what's going on, but that's certainely not due to numerical issues only.
(also note that the test with the pseudo eigenvectors fails the same way)
2008-10-03 13:22:54 +00:00
Gael Guennebaud
d907cd4410 Fixes in Eigensolver:
* eigenvectors => pseudoEigenvectors
 * added pseudoEigenvalueMatrix
 * clear the documentation
 * added respective unit test
Still missing: a proper eigenvectors() function.
2008-10-01 10:17:08 +00:00
Benoit Jacob
618de17bf7 block(int,int)->segment 2008-09-24 20:35:07 +00:00
Benoit Jacob
af991a6bdb small dox fixes 2008-09-15 16:19:48 +00:00
Benoit Jacob
247f2b0ffa * block() for vectors ---> segment()
* documentation improvements, especially in quickstart guide
2008-09-15 15:45:41 +00:00
Gael Guennebaud
0940ad7127 add normalization functions to Quaternion and fix compilation
issue with custom types
2008-09-14 12:21:22 +00:00
Gael Guennebaud
db030d4e28 * fix issues with "long double" type (useful to enforce the use of x87 registers)
* extend the documentation on "extending Eigen"
2008-09-14 11:59:10 +00:00
Gael Guennebaud
8473a77f2f move CommaInitializer out of MatrixBase and documment it (because of .finished()) 2008-09-13 18:51:51 +00:00
Gael Guennebaud
e5c50afed6 * Quaternion: added dot product and angularDistance functions. The latter is
based on the former.
* opengl_demo: makes IcoSphere better (vertices are instanciated only once) and
               removed the generation of a big geometry for the fancy spheres...
2008-09-11 11:19:34 +00:00
Gael Guennebaud
d3a70b7fac fix a numerical instability in Quaternion::slerp 2008-09-09 15:25:03 +00:00
Gael Guennebaud
703539110b add the missing templated version of block for sub-vectors 2008-09-09 09:30:23 +00:00
Gael Guennebaud
c41ceee750 2 typos 2008-09-08 17:08:27 +00:00
Gael Guennebaud
12e9de4abb fix stupid numerical stability issue in SVD::solve (though it is not yet as stable as LU with full pivoting) 2008-09-04 14:38:42 +00:00
Benoit Jacob
6add33e2c2 fix warning 2008-09-04 01:35:39 +00:00
Gael Guennebaud
52406aecad * Extend a bit ParametrizedLine and move it to a separate file,
add unit-tests for it.
* remove "using namespace std" in test/main.h such that the compilation
  bug found today in SVD won't happen again.
2008-09-03 22:35:45 +00:00
Gael Guennebaud
c29c7b0ea9 Fix bugs reported by Timothy Hunter:
* CholeskyWithoutSqrt with 1x1 matrices
 * .part<Diagonal>()
Updated unit tests to handle these cases
2008-09-03 20:52:26 +00:00
Gael Guennebaud
e14aa8c8aa Add coeff-wise comparisons to scalar operators. You can now write:
mat.cwise() < 2
instead of:
   mat.cwise() < MatrixType::Constant(mat.rows(), mat.cols(), 2)
2008-09-03 17:56:06 +00:00
Gael Guennebaud
59dc1da5bf Add a Select expression in the Array module which mimics a coeff-wise ?: operator.
Example:
  mat = (mat.cwise().abs().cwise() < Ones()).select(0,mat);
replaces all small values by 0. (the scalar version is "s = abs(s)<1 ? 0 : s")
2008-09-03 17:16:28 +00:00
Gael Guennebaud
622f2d5eae trivial compilation fix in SVD 2008-09-03 15:52:44 +00:00
Gael Guennebaud
3bbd1b3114 Bugfix regarding alignent in Assign.h (updated map unit test to detect this bug)
Anyway: LinearVectorization+CompleteUnrolling actually uses the InnerVectorization
unrollers, so these two cases could be merged to a single one...
2008-09-03 14:42:36 +00:00
Gael Guennebaud
75649551c2 compilation fixes with MSVC 2008-09-03 11:26:19 +00:00
Gael Guennebaud
f52d119b9c Solve a big issue with data alignment and dynamic allocation:
* add a WithAlignedOperatorNew class with overloaded operator new
* make Matrix (and Quaternion, Transform, Hyperplane, etc.) use it
  if needed such that "*(new Vector4) = xpr" does not failed anymore.
* Please: make sure your classes having fixed size Eigen's vector
  or matrice attributes inherit WithAlignedOperatorNew
* add a ei_new_allocator STL memory allocator to use with STL containers.
  This allocator really calls operator new on your types (unlike GCC's
  new_allocator). Example:
  std::vector<Vector4f> data(10);
  will segfault if the vectorization is enabled, instead use:
  std::vector<Vector4f,ei_new_allocator<Vector4f> > data(10);
NOTE: you only have to worry if you deal with fixed-size matrix types
with "sizeof(matrix_type)%16==0"...
2008-09-03 00:32:56 +00:00
Gael Guennebaud
d8df318d77 resurrected sparse triangular solver 2008-09-02 19:55:26 +00:00
Daniel Gomez Ferro
8fb1678f0f Extended sparse unit-test: nested blocks and InnerIterators.
Block specialization for sparse matrices.
InnerIterators for Blocks and fixes in CoreIterators.
2008-09-02 15:28:49 +00:00
Benoit Jacob
46fe7a3d9e if EIGEN_NICE_RANDOM is defined, the random functions will return numbers with
few bits left of the comma and for floating-point types will never return zero.
This replaces the custom functions in test/main.h, so one does not anymore need
to think about that when writing tests.
2008-09-01 17:31:21 +00:00
Gael Guennebaud
49ff9b204c remove the conceptualy broken "NoShear" transformation traits,
and rename NonAfine => Projective, GenericAffine => Affine, NoScaling => Isometry
2008-09-01 17:14:34 +00:00
Gael Guennebaud
6825c8dd6b QTransform conversion and doc 2008-09-01 06:33:19 +00:00
Gael Guennebaud
7e8aa63bb7 * Add Hyperplane::transform(Matrix/Transform)
* Fix compilations with gcc 3.4, ICC and doxygen
* Fix krazy directives (hopefully)
2008-08-31 13:32:29 +00:00
Benoit Jacob
5c34d8e20a The discussed changes to Hyperplane, the ParametrizedLine class, and the
API update in Regression...
2008-08-31 04:25:30 +00:00
Gael Guennebaud
5c8c09e021 add uniform scale/prescale functions in Tranform 2008-08-30 23:10:46 +00:00
Gael Guennebaud
9c450a52a2 Split Rotation.h to Rotation2D.h and RotationBase.h,
and more code factorization based on RotationBase.
Added notes about the main aim of the Translation and Scaling classes.
2008-08-30 21:36:04 +00:00
Gael Guennebaud
6ba991aa3a * added a RotationBase class following the CRT pattern
This allow code factorization and generic template specialization
  of functions
* added any_rotation * {Translation,Scaling,Transform} products methods
* rewrite of the actually broken ToRoationMatrix helper class to
  a global ei_toRotationMatrix function.
2008-08-30 20:11:04 +00:00
Gael Guennebaud
027ee14f31 api.kde.org is still bugged, let's do another try... 2008-08-30 16:30:58 +00:00
Gael Guennebaud
f1e6c56b77 * rename TranformationKnowledge to TransformTraits
* apply the same principle to extractRotation and fix it to
  extract a rotation corresponding to a positive scaling
2008-08-30 15:22:45 +00:00
Gael Guennebaud
236b7a545d update Transform::inverse() to take an optional argument stating whether the transformation is:
NonAffine, Affine (default), contains NoShear, contains NoScaling
that allows significant speed improvements. If you like it, this concept could be applied to
Transform::extractRotation (or to a more advanced decomposition function) and to Hyperplane::transformed()
and maybe to some other places... e.g., I think a Transform::normalMatrix() function would not harm and
warn user that the transformation of normals is not that trivial (I saw this mistake much too often)
2008-08-30 12:42:06 +00:00
Gael Guennebaud
9e7a9cde14 Add Scaling and Translation class as discussed on ML, still missing:
* handling Quaternion, AngleAxis and Rotation2D, 2 options here:
 1- make all of them inheriting a common base class Rotation such that we can
    have a single version of operator* for all the rotation type (they all get converted to a matrix)
 2- write a version for all type (so 3 rotations types * 3 for Transform,Translation and Scaling)
* real documentation
2008-08-30 00:08:23 +00:00
Gael Guennebaud
6d841512c7 some hyperplane changes:
- the coefficients are stored in a single vector
- added transformation methods
- removed Line* typedef since in 2D this is really an hyperplane
  and not really a line...
- HyperPlane => Hyperplane
2008-08-29 13:30:37 +00:00