Commit Graph

403 Commits

Author SHA1 Message Date
Benoit Jacob
5309ef5b5e - improve and comment the "BasicStuff" test.
- adjust behavior of Matrix(int,int) constructor
- s/EI_/EIGEN_/
2007-11-26 08:47:07 +00:00
Benoit Jacob
f14712a1a3 Fix damage done by automatic search-and-replace 2007-11-25 22:05:49 +00:00
Benoit Jacob
49c78643da add cast<newtype>() function to casts the scalars to another type. 2007-10-19 14:46:08 +00:00
Benoit Jacob
d6f26dc8eb clarify the situation with EI_INHERIT_ASSIGNMENT_OPERATORS 2007-10-15 06:11:59 +00:00
Benoit Jacob
884a718b0a make shameless use of const_cast to reduce code redundancy. This means Eigen2
gives up enforcing constness. I really tried to enforce it, but it really was
much hassle because our expression templates can be lvalues (not only rvalues)
and so much code had to be written twice.
2007-10-15 05:56:21 +00:00
Benoit Jacob
f355ef2df0 Merge WrapArray into FromArray. Less code. The downside is that we're using one more
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
2007-10-14 18:02:16 +00:00
Benoit Jacob
a94a8c68e8 add fromArray() and wrapArray().
For example, the following now works:

  double a1[3] = {1.0, 3.0, 2.0}, a2[3];
  Vector3d::wrapArray(a2) = 2 * Vector3d::fromArray(a1);
  cout << Vector3d::fromArray(a2) << endl; // output: 2,6,4
2007-10-14 14:45:31 +00:00
Benoit Jacob
3f97918760 restrict identity() to square matrices; small change helping g++ optimize. 2007-10-14 10:01:25 +00:00
Benoit Jacob
6c8f159635 add zero() and identity() static methods, update unit-tests 2007-10-14 09:18:18 +00:00
Benoit Jacob
0f2df4b202 remove support for type std::complex<int>. Simplify NumTraits accordingly. 2007-10-14 08:16:50 +00:00
Benoit Jacob
5f0af72abc mark more methods as const. also rename, Numeric.h->NumTraits.h 2007-10-13 20:53:30 +00:00
Benoit Jacob
e445f5085a implement the first _real_ unit-tests, testing the results for correctness instead
of just checking compilation.

Fix the many issues discovered by these unit-tests, by the way fixing a performance bug.
2007-10-13 16:56:24 +00:00
Benoit Jacob
31061557a5 add unary operator-(), computing the opposite. 2007-10-13 14:38:51 +00:00
Benoit Jacob
55e80e1599 split MatrixOps.h into 3 files; rename ScalarOps.h; remove useless #includes. 2007-10-13 14:31:27 +00:00
Benoit Jacob
12bcafdc75 some renaming in the fuzzy compares, and in the multiplications 2007-10-13 14:19:23 +00:00
Benoit Jacob
a4626cc808 rework the numeric traits now that we're using a namespace and no prefix 2007-10-12 05:56:36 +00:00
Benoit Jacob
3654ee8b07 SVN_SILENT:
repair some damage made by the automatic search and replace used in the
prefix->namespace move
2007-10-12 05:15:25 +00:00
Benoit Jacob
0d44c0906b simplify the new USING_EIGEN_DATA_TYPES macro 2007-10-11 20:32:12 +00:00
Benoit Jacob
61de15f361 Democracy 1 - 0 Dictatorship
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 :)
2007-10-11 20:14:01 +00:00
Benoit Jacob
3c98677376 fix big bug in loop unrolling 2007-10-10 06:33:09 +00:00
Benoit Jacob
06e1e0d83b fix dot product, add norm/norm2/normalized
add fuzzy compares for matrices/vectors
add random matrix/vector generation
2007-10-10 06:09:56 +00:00
Benoit Jacob
7f0a546a81 add norm() and norm2(); some polishing 2007-10-08 10:19:49 +00:00
Benoit Jacob
ac6ff5efd6 reverse certain inner loops. Now the benchmark runs in 3.5s instead of 5.5s before! 2007-10-08 07:24:00 +00:00
Benoit Jacob
f0be175bdc add dot product, extend meta unrolling everywhere 2007-10-08 07:17:54 +00:00
Benoit Jacob
95b3316701 reorganize meta loop unrolling, add Trace (meta-unrolled), fix compilation issues in
the conjugation/adjunction stuff
2007-10-07 16:40:49 +00:00
Benoit Jacob
4fe78b8e10 reorganization of headers, part 2/2... 2007-10-07 15:59:09 +00:00
Benoit Jacob
be429ebf9c reorganisation of headers, commit47b935fc42cbf2ca992d8a270bc1b0fc97d1f6bc
/2....
2007-10-07 15:58:30 +00:00
Benoit Jacob
f939abd5f3 aargh, had forgotten to 'svn add' a file. Yeah, 'svn st' is my friend, i know... 2007-10-07 15:14:05 +00:00
Benoit Jacob
9eff685428 add matrix conjugation and adjunction.
compilation fixes in the numeric traits.
2007-10-07 15:12:41 +00:00
Benoit Jacob
ae2072406c Introduce Numeric Traits, with fuzzy compares, random numbers, etc. 2007-10-07 12:44:42 +00:00
Benoit Jacob
c768a44909 Add matrix transposition 2007-10-01 18:20:35 +00:00
Benoit Jacob
f5f45d751c Move the meta loop unrolling to a separate file, Loop.h 2007-10-01 17:07:38 +00:00
Benoit Jacob
96524fc573 Split Row and Column into separate files.
Introduce a notion of RowVector (typedef for Matriw with 1 row)
Make row() return a row vector instead of a "column vector"
Introduce operator[] to access elements of row/column vectors uniformly
Remove default arguments in operator(), these were for vectors, now use operator[] instead
2007-10-01 07:45:30 +00:00
Benoit Jacob
3cf6caba1a remove useless typedefs 2007-10-01 06:51:25 +00:00
Benoit Jacob
6015698047 Michael was right, it's best to base the unrolling limit on the product Rows*Cols. 2007-10-01 06:30:20 +00:00
Benoit Jacob
656919619f - add copyright line for Michael Olbrich
- some meta unrolling improvements
2007-10-01 06:23:05 +00:00
Benoit Jacob
e116aba444 adapt to coding style used elsewhere in eigen2 2007-10-01 04:57:51 +00:00
Michael Olbrich
2d823d8ef6 Generic loop unrolling with template metaprograms. It seems to be as fast as
manually unrolling.
TODO: decide when to stop unrolling (speed vs. code size).
      maybe only unroll one loop for larger matixes.
2007-09-30 20:38:09 +00:00
Michael Olbrich
1d3743d2c5 for dynamic size matrix (Rows|Cols)AtCompileTime is always EiDynamic and not
"(Rows|Cols)AtCompileTime - 1" which would be EiDynamic - 1 == -2
2007-09-30 20:23:24 +00:00
Benoit Jacob
4241dddee9 temporarily remove division unit-tests. they caused div-by-zero's , reported by Michael Olbrich.
The solution will consist in adding a real Traits system.
2007-09-30 16:45:40 +00:00
Benoit Jacob
023773beaa Fix super-nasty bug in the declaration of the storage array of fixed-size matrices.
Also some simplifications.
2007-09-30 14:56:11 +00:00
Benoit Jacob
7d41ad9d90 Get rid of a nasty const_cast by introducing a MatrixConstRef class.
Remove the __restrict__'s for now.
2007-09-29 17:27:20 +00:00
Benoit Jacob
ee63e15e2c make matrix multiplication do immediate evaluation; add lazyMul() for the old behaviour
some reorganization, especially in MatrixStorage
start playing with loop unrolling, always_inline, and __restrict__
2007-09-29 08:28:36 +00:00
Benoit Jacob
51e29ae4bd some reorganization leading to simpler expression trees 2007-09-28 11:20:29 +00:00
Benoit Jacob
aa3294f14e add example to the documentation 2007-09-28 06:17:36 +00:00
Benoit Jacob
835e0c9f67 Found a way to have eval() be a member function of class EiObject, instead of a global function.
CCMAIL:bensch128@yahoo.com
2007-09-28 06:10:34 +00:00
Benoit Jacob
28c44a95c2 Finish prefixing everything with "Ei" 2007-09-27 19:54:04 +00:00
Benoit Jacob
5160e9d029 Half-way commit prefixing object names. I am forced to commit now
because I renamed a file once with a wrong filename and svn refuses to
let me rename it again, tells me i should propagate first.
2007-09-27 19:38:40 +00:00
Benoit Jacob
4e299afb1f don't enclose eigen in a namespace. prefixing is the way to go.
For example Qt uses a prefix and no namespace (except for a few things)
2007-09-27 19:24:57 +00:00
Benoit Jacob
d99d9407df add operators *= and /= 2007-09-27 19:20:06 +00:00