Commit Graph

219 Commits

Author SHA1 Message Date
Benoit Jacob
c22d10f94c LU class:
* add image() and computeImage() methods, with unit test
* fix a mistake in the definition of KernelResultType
* fix and improve comments
2008-12-17 16:47:55 +00:00
Benoit Jacob
89f468671d * replace postfix ++ by prefix ++ wherever that makes sense in Eigen/
* fix some "unused variable" warnings in the tests; there remains a libstdc++ "deprecated"
warning which I haven't looked much into
2008-12-17 14:30:01 +00:00
Benoit Jacob
38b83b4157 * throw bad_alloc if exceptions are enabled, after patch by Kenneth Riddile
* disable vectorization on MSVC 2005, as it doesn't have all the required intrinsics. require 2008.
2008-12-16 15:17:29 +00:00
Gael Guennebaud
5015e48361 Sparse module: add a more flexible SparseMatrix::fillrand() function
which allows to fill a matrix with random inner coordinates (makes sense
only when a very few coeffs are inserted per col/row)
2008-12-11 18:26:24 +00:00
Gael Guennebaud
beabf008b0 bugfix in DiagonalProduct: a "DiagonalProduct<SomeXpr>" expression
is now evaluated as a "DiagonalProduct<Matrix<SomeXpr::Eval> >".
Note that currently this only happens in DiagonalProduct.
2008-12-10 19:02:13 +00:00
Benoit Jacob
069ecbb4ab * complete the change norm2->squaredNorm in PartialRedux
* 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
2008-12-07 21:40:53 +00:00
Gael Guennebaud
9c0deb55ca bugfix in matrix to Euler-angles function 2008-12-06 11:04:33 +00:00
Gael Guennebaud
faf942a947 Add a generic matrix to Euler-angles function.
Perhaps the prototype of this function could be improved,
see comments in the code
2008-12-05 15:56:28 +00:00
Benoit Jacob
c1e2156d8a * Much better, consistent error msgs when mixing different scalar types:
- 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
2008-12-03 21:01:55 +00:00
Gael Guennebaud
20c11bc52c prefix all Eigen cmake variable with EIGEN_ and switched to lowercase for all cmake files 2008-12-02 12:59:10 +00:00
Gael Guennebaud
eb9dadf3b2 clean FindUmfpack.cmake wrt enable_language(Fortran) 2008-12-02 12:20:13 +00:00
Benoit Jacob
00f89a8f37 Update e-mail address 2008-11-24 13:40:43 +00:00
Gael Guennebaud
139529e97b * add .imag() function
* fix a very old bug in EigenSolver that I had completely forgotten
  (thanks to Timothy to refresh my mind)
* fix doc of Matrix::Map
2008-11-14 09:55:25 +00:00
Gael Guennebaud
86ccd99d8d Several improvements in sparse module:
* 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.
2008-11-05 13:47:55 +00:00
Benoit Jacob
e80099932a add lpNorm<p>() method to MatrixBase, implemented in Array module, with
specializations for cases p=1,2,Eigen::Infinity.
2008-11-03 22:47:00 +00:00
Benoit Jacob
a0ec0fca5a Add Matrix::Map() and Matrix::AlignedMap() static methods 2008-11-03 21:49:03 +00:00
Benoit Jacob
3d90c13970 norm2() renamed to squaredNorm(), kept as deprecated for now. 2008-11-03 19:14:17 +00:00
Gael Guennebaud
ebe14aae7d add transposeInPlace (not optimized yet for rectangular matrix) 2008-10-29 15:24:08 +00:00
Gael Guennebaud
9f873a855f unit-tests: link to external libs only for the tests which require them 2008-10-26 21:38:30 +00:00
Gael Guennebaud
94f6f2a7de Add an axis aligned box in the geometry module.
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 !
2008-10-26 15:04:31 +00:00
Gael Guennebaud
ec0a423862 Add isApprox in Geometry module's classes.
Complete unit tests wrt previous commits.
2008-10-25 23:10:21 +00:00
Gael Guennebaud
568a7e8eba improve assertion checking in product 2008-10-25 11:52:13 +00:00
Gael Guennebaud
8ea8b481de As discussed on ML:
* 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 ;)
2008-10-24 21:42:03 +00:00
Gael Guennebaud
cf0f82ecbe sparse module:
- remove some useless stuff => let's focus on a single sparse matrix format
 - finalize the new RandomSetter
2008-10-21 13:35:04 +00:00
Gael Guennebaud
5066fe8bbe * sparse LU: add extraction of L,U,P, and Q, as well as determinant
for both backends.
* extended a bit the sparse unit tests
2008-10-20 17:03:09 +00:00
Gael Guennebaud
e1c50a3cb1 add unit tests for sparse LU and fix a couple of warnings 2008-10-20 11:37:45 +00:00
Gael Guennebaud
fa27cd1ed0 * add cmake files to find (optional) supported libraries
* add unit tests for sparse cholesky
2008-10-20 10:43:11 +00:00
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
Gael Guennebaud
a930dfb229 extend sparse unit tests with transpose and matrix product 2008-10-04 14:25: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
247f2b0ffa * block() for vectors ---> segment()
* documentation improvements, especially in quickstart guide
2008-09-15 15:45:41 +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
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
703539110b add the missing templated version of block for sub-vectors 2008-09-09 09:30:23 +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
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
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