* fix issues in Product revealed by this test
* in Dot.h forbid mixing of different types (at least for now, might allow real.dot(complex) in the future).
* actually GCC 4.3.0 has a bug, "deprecated" placed at the end
of a function prototype doesn't have any effect, moving them to
the start of the function prototype makes it actually work!
* finish porting the cholesky unit-test to the new LLT/LDLT,
after the above fix revealed a deprecated warning
Derived to MatrixBase.
* the optimization of eval() for Matrix now consists in a partial
specialization of ei_eval, which returns a reference type for Matrix.
No overriding of eval() in Matrix anymore. Consequence: careful,
ei_eval is no longer guaranteed to give a plain matrix type!
For that, use ei_plain_matrix_type, or the PlainMatrixType typedef.
* so lots of changes to adapt to that everywhere. Hope this doesn't
break (too much) MSVC compilation.
* add code examples for the new image() stuff.
* lower a bit the precision for floats in the unit tests as
we were already doing some workarounds in inverse.cpp and we got some
failed tests.
* somehow the NICE_RANDOM stuff wasn't being used anymore and
tests were sometimes failing again. Fixed by #including Eigen/Array
instead of cherry-picking just Random.h.
* little fixes in the unaligned assert page
- in matrix-matrix product, static assert on the two scalar types to be the same.
- Similarly in CwiseBinaryOp. POTENTIALLY CONTROVERSIAL: we don't allow anymore binary
ops to take two different scalar types. The functors that we defined take two args
of the same type anyway; also we still allow the return type to be different.
Again the reason is that different scalar types are incompatible with vectorization.
Better have the user realize explicitly what mixing different numeric types costs him
in terms of performance.
See comment in CwiseBinaryOp constructor.
- This allowed to fix a little mistake in test/regression.cpp, mixing float and double
- Remove redundant semicolon (;) after static asserts
* add a LDL^T factorization with solver using code from T. Davis's LDL
library (LPGL2.1+)
* various bug fixes in trianfular solver, matrix product, etc.
* improve cmake files for the supported libraries
* split the sparse unit test
* etc.
Some naming questions:
- for "extend" we could also think of: "expand", "union", "add"
- same for "clamp": "crop", "intersect"
- same for "contains": "isInside", "intersect"
=> ah "intersect" is conflicting, so that eliminates this one !
* remove the automatic resizing feature of operator =
* add function Matrix::set() to be used when the previous
behavior is wanted
* the default constructor of dynamic-size matrices now
creates a "null" matrix (data=0, rows = cols = 0)
instead of a 1x1 matrix
* fix UnixX typos ;)
* 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.
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)
* eigenvectors => pseudoEigenvectors
* added pseudoEigenvalueMatrix
* clear the documentation
* added respective unit test
Still missing: a proper eigenvectors() function.
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...
* 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"...
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.
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.
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)
* 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
- 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
AngleAxis*Vector products were wrong because they returned the product
_expression_
toRotationMatrix()*other;
and toRotationMatrix() died before that expression would be later
evaluated. Here it would not have been practical to NestByValue as this
is a whole matrix. So, let them simply evaluate and return the result by
value.
The geometry.cpp unit-test only checked for compatibility between
various rotations, it didn't check the correctness of the rotations
themselves. That's why this bug escaped us. So, this commit checks that
the rotations produced by AngleAxis have all the expected properties.
Since the compatibility with the other rotations is already checked,
this should validate them as well.
* added a meta.cpp unit test
* EIGEN_TUNE_FOR_L2_CACHE_SIZE now represents L2 block size in Bytes (whence the ei_meta_sqrt...)
* added a CustomizeEigen.dox page
* added a TOC to QuickStartGuide.dox
* replaced the Flags template parameter of Matrix by StorageOrder
and move it back to the 4th position such that we don't have to
worry about the two Max* template parameters
* extended EIGEN_USING_MATRIX_TYPEDEFS with the ei_* math functions
* bugfix in Dot unroller
* added special random generator for the unit tests and reduced the tolerance threshold by an order of magnitude
this fixes issues with sum.cpp but other tests still failed sometimes, this have to be carefully checked...
IoFormat OctaveFmt(4, AlignCols, ", ", ";\n", "", "", "[", "]");
cout << mat.format(OctaveFmt);
The first "4" is the precision.
Documentation missing.
* Some compilation fixes
- the decompostion code has been adfapted from JAMA
- handles non square matrices of size MxN with M>=N
- does not work for complex matrices
- includes a solver where the parts corresponding to zero singular values are set to zero
I don't see any reason not to allow it, it doesn't add much code, and
it makes porting from eigen1 easier.
*expand tests/basicstuff to first test coefficient access methods
* fix .normalized() so that Random().normalized() works; since the return
type became complicated to write down i just let it return an actual
vector, perhaps not optimal.
* add Sparse/CMakeLists.txt. I suppose that it was intentional that it
didn't have CMakeLists, but in <=2.0 releases I'll just manually remove
Sparse.
*in test/CMakeLists : modify EI_ADD_TEST so that 2nd argument is
additional compiler flags. used to add -O2 to test_product_large so it
doesn't take forever.
pivoting for better numerical stability. For now the only application is
determinant.
* New determinant unit-test.
* Disable most of Swap.h for now as it makes LU fail (mysterious).
Anyway Swap needs a big overhaul as proposed on IRC.
* Remnants of old class Inverse removed.
* Some warnings fixed.
* faster matrix-matrix and matrix-vector products (especially for not aligned cases)
* faster tridiagonalization (make it using our matrix-vector impl.)
Others:
* fix Flags of Map
* split the test_product to two smaller ones
=> up to 6 times faster !
* Added DirectAccessBit to Part
* Added an exemple of a cwise operator
* Renamed perpendicular() => someOrthogonal() (geometry module)
* Fix a weired bug in ei_constant_functor: the default copy constructor did not copy
the imaginary part when the single member of the class is a complex...
Renamed "MatrixBase::extract() const" to "MatrixBase::part() const"
* Renamed static functions identity, zero, ones, random with an upper case
first letter: Identity, Zero, Ones and Random.
Removed EulerAngles, addes typdefs for Quaternion and AngleAxis,
and added automatic conversions from Quaternion/AngleAxis to Matrix3 such that:
Matrix3f m = AngleAxisf(0.2,Vector3f::UnitX) * AngleAxisf(0.2,Vector3f::UnitY);
just works.
* Improve the efficiency of matrix*vector in unaligned cases
* Trivial fixes in the destructors of MatrixStorage
* Removed the matrixNorm in test/product.cpp (twice faster and
that assumed the matrix product was ok while checking that !!)
- remove all invertibility checking, will be redundant with LU
- general case: adapt to matrix storage order for better perf
- size 4 case: handle corner cases without falling back to gen case.
- rationalize with selectors instead of compile time if
- add C-style computeInverse()
* update inverse test.
* in snippets, default cout precision to 3 decimal places
* add some cmake module from kdelibs to support btl with cmake 2.4
and vector * row-major products. Currently, it is enabled only is the matrix
has DirectAccessBit flag and the product is "large enough".
Added the respective unit tests in test/product/cpp.
* added complete implementation of sparse matrix product
(with a little glue in Eigen/Core)
* added an exhaustive bench of sparse products including GMM++ and MTL4
=> Eigen outperforms in all transposed/density configurations !
* rework PacketMath and DummyPacketMath, make these actual template
specializations instead of just overriding by non-template inline
functions
* introduce ei_ploadt and ei_pstoret, make use of them in Map and Matrix
* remove Matrix::map() methods, use Map constructors instead.
* make the conj functor vectorizable: it is just identity in real case,
and complex doesn't use the vectorized path anyway.
* fix bug in Block: a 3x1 block in a 4x4 matrix (all fixed-size)
should not be vectorizable, since in fixed-size we are assuming
the size to be a multiple of packet size. (Or would you prefer
Vector3d to be flagged "packetaccess" even though no packet access
is possible on vectors of that type?)
* rename:
isOrtho for vectors ---> isOrthogonal
isOrtho for matrices ---> isUnitary
* add normalize()
* reimplement normalized with quotient1 functor
packet access, it is not certain that it will bring a performance
improvement: benchmarking needed.
* improve logic choosing slice vectorization.
* fix typo in SSE packet math, causing crash in unaligned case.
* fix bug in Product, causing crash in unaligned case.
* add TEST_SSE3 CMake option.
* 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
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.
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)
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.
finally that's more subtle than just using ei_nested, because when
flagging with NestByValueBit we want to store the expression by value
already, regardless of whether it already had the NestByValueBit set.
* rename temporary() ----> nestByValue()
* move the old Product.h to disabled/, replace by what was ProductWIP.h
* tweak -O and -g flags for tests and examples
* reorder the tests -- basic things go first
* simplifications, e.g. in many methoeds return derived() and count on
implicit casting to the actual return type.
* strip some not-really-useful stuff from the heaviest tests
Triangular class
- full meta-unrolling in Part
- move inverseProduct() to MatrixBase
- compilation fix in ProductWIP: introduce a meta-selector to only do
direct access on types that support it.
- phase out the old Product, remove the WIP_DIRTY stuff.
- misc renaming and fixes
using a macro and _Pragma.
- use OpenMP also in cacheOptimalProduct and in the
vectorized paths as well
- kill the vector assignment unroller. implement in
operator= the logic for assigning a row-vector in
a col-vector.
- CMakeLists support for building tests/examples
with -fopenmp and/or -msse2
- updates in bench/, especially replace identity()
by ones() which prevents underflows from perturbing
bench results.
Currently only the following platform/operations are supported:
- SSE2 compatible architecture
- compiler compatible with intel's SSE2 intrinsics
- float, double and int data types
- fixed size matrices with a storage major dimension multiple of 4 (or 2 for double)
- scalar-matrix product, component wise: +,-,*,min,max
- matrix-matrix product only if the left matrix is vectorizable and column major
or the right matrix is vectorizable and row major, e.g.:
a.transpose() * b is not vectorized with the default column major storage.
To use it you must define EIGEN_VECTORIZE and EIGEN_INTEL_PLATFORM.
in ei_xpr_copy and operator=, respectively.
* added Matrix::lazyAssign() when EvalBeforeAssigningBit must be skipped
(mainly internal use only)
* all expressions are now stored by const reference
* added Temporary xpr: .temporary() must be called on any temporary expression
not directly returned by a function (mainly internal use only)
* moved all functors in the Functors.h header
* added some preliminaries stuff for the explicit vectorization
* added "all" and "any" special redux operators
* added support bool matrices
* added support for cost model of STL functors via ei_functor_traits
(By default ei_functor_traits query the functor member Cost)
when to evaluate arguments and when to meta-unroll.
-use it in Product to determine when to eval args. not yet used
to determine when to unroll. for now, not used anywhere else but
that'll follow.
-fix badness of my last commit
* macro renaming: EIGEN_NDEBUG becomes EIGEN_NO_DEBUG
as this is much better (and similar to Qt) and
EIGEN_CUSTOM_ASSERT becomes EIGEN_USE_CUSTOM_ASSERT
* protect Core header by a EIGEN_CORE_H
internal classes: AaBb -> ei_aa_bb
IntAtRunTimeIfDynamic -> ei_int_if_dynamic
unify UNROLLING_LIMIT (there was no reason to have operator= use
a higher limit)
etc...
Finally the importing macro is named EIGEN_BASIC_PUBLIC_INTERFACE
because it does not only import the ei_traits, it also makes the base class
a friend, etc.
template parameter "Scalar" is removed. This is achieved by introducting a
template <typename Derived> struct Scalar to achieve a forward-declaration of
the Scalar typedefs.
If the number of coefficients does not match the matrix size, then an assertion is raised.
No support for xpr on the right side for the moment.
* Added support for assertion checking. This allows to test that an assertion is indeed raised
when it should be.
* Fixed a mistake in the CwiseUnary example.
- compatible with current STL's functors as well as with the extention proposal (TR1)
* thanks to the above, Cast and ScalarMultiple have been removed
* benchmark_suite is more flexible (compiler and matrix size)
* functor templates are not template template parameter anymore
(this allows to make templated functors !)
* Main page: extented compiler discussion
* A small hack to support gcc 3.4 and 4.0 (see the main page)
* Fix a cast type issue in Cast
* Various doxygen updates (mainly Cwise stuff and added doxygen groups
in MatrixBase to split the huge memeber list, still not perfect though)
* Updated Gael's email address
1) Eigen2 co-installable with Eigen1 without conflict, without affecting programs including either.
2) #include<Eigen/Core> without the .h without conflict with the Core/ directory
3) Uniformize coding style of the CMakeLists.
with minimal code duplication. There now are only two (2)
const_cast remaining in the whole source code.
- eigen2 now fully allows copying a row-vector into a column-vector.
added a unit-test for that.
- split unit tests, improve docs, various improvements.
0) asserts are only done in the public API, except for a few ones explicitly
named eigen_internal_assert.
1) internal asserts are disabled unless EIGEN_INTERNAL_DEBUGGING is defined.
This limits the impact of debugging on performance.
2) no 'unused argument' warnings anymore when compiling with -DNDEBUG
const_cast. But I think that anyway trying to maintain const strictness in Eigen2 is not
worth the hassle.
Konstantin: so the code snippet I sent you won't work anymore, replace wrapArray with fromArray.
CCMAIL:konst.heil@stud.uni-heidelberg.de
After huge thread on eigen mailing list, it appears that i'm the
only one in favor of prefix Ei. Everybody else prefers namespace
Eigen like we did in Eigen 1. So, revert.
Also add a macro USING_EIGEN_DATA_TYPES that application programmers
can use to automatically do "using"on the Matrix class and its
matrix/vector typedefs:
using Eigen::Matrix;
using Eigen::Matrix2d;
using Eigen::Vector2d;
... (the list of typedefs is really long).
thanks to the suffixes, the Vector typedefs aren't really polluting.
CCMAIL:eigen@lists.tuxfamily.org
P.S. Danny, please skip this one :) I know you already reported the
namespace->prefix move, now that one would be too much noise :)
1) Kill MatrixXpr class, instead let all class inherit a common EigenBase class
2) Kill MatrixBase/Matrix/Vector classes, instead introduce a single Matrix class,
a MatrixStorage class, and typedefs to emulate vectors
3) Huge code cleanup, remove large preprocessor macros, sloccount drop to ~750
down from 1100.
4) Introduce compile-time-known sizes
Now the user doesn't need anymore to call .xpr() and can simply do:
matrix.row(i) += matrix.row(j)
Also remove the obsolete MatrixXpr::hasDynamicSize() method (thanks to
Michael Olbrich for reporting this).
CCMAIL:<michael.olbrich@gmx.net>