Commit Graph

5487 Commits

Author SHA1 Message Date
Benoit Jacob
59be5c3124 enforce constness in map(), do only one const_cast, and improve API 2007-12-19 08:14:00 +00:00
Benoit Jacob
8bb98a80b4 split the coeffs accessors/mutators into a separate Coeffs.h file 2007-12-18 16:02:14 +00:00
Benoit Jacob
3380429e3a Improve the "map" API and corresponding Matrix constructors 2007-12-18 15:29:28 +00:00
Benoit Jacob
a32690a222 Eval is read-only, don't generate any assignment operator 2007-12-18 12:12:37 +00:00
Benoit Jacob
2c656c51e6 add matrix constructor taking an array. update unit-tests. 2007-12-18 08:56:18 +00:00
Benoit Jacob
53040f53d9 add constructors and accessors/mutators specific to small vectors.
Add corresponding unit-test.
2007-12-17 20:51:40 +00:00
Benoit Jacob
f75a0c5179 some more cleanup and reorganisation 2007-12-17 07:25:11 +00:00
Benoit Jacob
9314b8e024 Some cleanup and renaming. 2007-12-16 12:41:37 +00:00
Benoit Jacob
7c38475291 -add Ones, DiagonalMatrix, DiagonalCoeffs
-expand and improve unit-tests
-various renaming and improvements
2007-12-15 18:16:30 +00:00
Benoit Jacob
fc7b2b5c20 expand unit-tests and fix const-qualifaction bugs thus discovered 2007-12-12 17:48:20 +00:00
Benoit Jacob
e9a458a7a5 Split the global math functions out of NumTraits.h 2007-12-12 16:57:12 +00:00
Benoit Jacob
7ddc13b9fa use a more c++-ish way of preventing the compiler from generating default operator=
when it's not wanted. Thanks to Christian Mayer for the tip.
2007-12-12 16:52:17 +00:00
Benoit Jacob
fa8009c6b7 1) remove EIGEN_UNUSED, instead use non-named arguments.
2) use T instead of const T& when that makes more sense
Thanks to Christian Mayer a.k.a Mekhzolan for the tips.
2007-12-11 15:25:43 +00:00
Benoit Jacob
0cbdaf6bb8 revert most of my previous commit. forcing the compiler to inline only increased
its memory usage.
2007-12-11 14:57:42 +00:00
Benoit Jacob
936b0de9cc play with inlining to get better performance when the compiler is not asked to optimize 2007-12-11 13:14:14 +00:00
Benoit Jacob
8117c9aa83 oops, forgot to commit that change 2007-12-11 10:48:35 +00:00
Benoit Jacob
0a7086f1ec rename CopyHelper into OperatorEquals, get rid of the auxiliary _copy_helper() method,
and make sure copies are always done in column-dominant order
2007-12-11 10:19:49 +00:00
Benoit Jacob
2b20814ced Expand and improve unit-tests 2007-12-11 10:07:18 +00:00
Benoit Jacob
d50ce24dd9 rework asserts system so as to minimize the impact of debugging code on performance 2007-12-11 10:06:43 +00:00
Benoit Jacob
effaee9bc7 fix bugs in Block/DynBlock 2007-12-11 10:05:50 +00:00
Benoit Jacob
fc924bc7d4 specialize for Size==0 in order to catch user bugs and not clutter
the compiler output with an infinite recursion. Also add a #define switch
for loop unrolling.
2007-12-11 10:04:39 +00:00
Benoit Jacob
9d51572cbe rework the random numbers API 2007-12-11 10:02:48 +00:00
Benoit Jacob
c58c892e25 had forgotten to 'svn add' that file... 2007-12-05 08:57:23 +00:00
Benoit Jacob
68eba600b1 big reorganisation of asserts, so that:
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
2007-12-05 08:56:42 +00:00
Benoit Jacob
b569216dc3 remove useless default argument values 2007-12-05 07:44:57 +00:00
Benoit Jacob
1a94c28bfe and here is the fixed-size Block class 2007-12-05 07:39:26 +00:00
Benoit Jacob
04502cccd9 rename Block to DynBlock and rework API to make place for
upcoming fixed-size Block matrix. Also some cleanup.
2007-12-05 07:22:22 +00:00
Benoit Jacob
346c00f4c8 Rework the unit-tests to use lower precision, so as to eliminate
false positives. Also some cleanup in the fuzzy compares.
2007-12-03 10:23:08 +00:00
Benoit Jacob
5abaaf9688 Test application now takes 'seed' and 'repeat' command-line args 2007-12-03 08:35:23 +00:00
Benoit Jacob
e05f29191e Much more convenient, less over-engineered NumTraits. Done during this KDE-Edu weekend. 2007-12-02 18:32:59 +00:00
Benoit Jacob
2fdd067d9e add more unit-tests (covering transpose, conjugate, adjoint, dot product...) 2007-11-28 15:34:40 +00:00
Benoit Jacob
39f1776bde rename Object -> MatrixBase 2007-11-27 13:57:51 +00:00
Benoit Jacob
344623e872 Matrix(int) constructor is only for vectors. 2007-11-26 09:21:11 +00:00
Benoit Jacob
a587346b47 Matrix(int,int) constructor no longer takes default arguments.
Instead, introduce Matrix() and Matrix(int); however, dynamic dimensions
are required to be specified in the constructor (we no longer default to 1)
2007-11-26 09:11:12 +00:00
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