93 Commits

Author SHA1 Message Date
Gael Guennebaud
7098e6d976 Add isfinite overload for complexes. 2014-04-14 21:57:49 +02:00
Gael Guennebaud
1bb1a57ef7 merge with default branch 2013-11-05 10:31:59 +01:00
Hauke Heibel
097a105603 Disabled std::log1p on Cygwin. 2013-08-10 19:10:23 +02:00
Jitse Niesen
5879937f58 Merge in jdh8's branch.
* Enable singular matrix power and complex exponents.
* Eliminate unnecessary copying for sparse Kronecker product.
2013-07-21 20:50:15 +01:00
Gael Guennebaud
2f593ee67c merge with main branch 2013-07-17 13:21:35 +02:00
Gael Guennebaud
5a4519d2b4 Revisit the implementation of random_default_impl for integer to make sure avoid overflows and compiler warnings. 2013-07-10 21:11:41 +02:00
Chen-Pang He
04bd1e3fc0 Slightly optimize atanh2. 2013-07-08 16:49:27 +08:00
Gael Guennebaud
62670c83a0 Fix bug #314: move remaining math functions from internal to numext namespace 2013-06-10 23:40:56 +02:00
Gael Guennebaud
64054ee396 Add nvcc support for normalize, initializers, and fuzzy comparisons 2013-06-05 15:38:33 +02:00
Gael Guennebaud
9cd2d14005 merge with default branch 2013-04-19 11:21:39 +02:00
Gael Guennebaud
12439e1249 Port SelfCwiseBinaryOp and Dot.h to nvcc, fix portability issue with std::min/max 2013-04-05 16:35:49 +02:00
Jitse Niesen
97c9e3c74f Handle special case in atanh2(x,y) when y = 0.
This fixes matrix_power unit test on clang.
2013-03-09 16:58:05 +00:00
Hauke Heibel
57e50789f3 Added missing using std::sqrt. 2013-01-27 13:46:06 +01:00
Gael Guennebaud
a76fbbf397 Fix bug #314:
- remove most of the metaprogramming kung fu in MathFunctions.h (only keep functions that differs from the std)
- remove the overloads for array expression that were in the std namespace
2012-11-06 15:25:50 +01:00
Chen-Pang He
d23134e4a7 Avoid inefficient 2x2 LU. Move atanh to internal for maintainability. 2012-08-30 23:40:30 +08:00
Benoit Jacob
69124cfca2 Automatic relicensing to MPL2 using Keirs script. Manual fixup follows. 2012-07-13 14:42:47 -04:00
Gael Guennebaud
5dbdde0420 Fix bug #480: workaround the Android NDK defining isfinite as a macro 2012-07-05 17:22:25 +02:00
Jitse Niesen
3c412183b2 Get rid of include directives inside namespace blocks (bug #339). 2012-04-15 11:06:28 +01:00
Gael Guennebaud
0d03492e1e std::isfinite is non standard 2012-01-23 21:49:00 +01:00
Igor Krivenko
36457178f9 bug #352:properly cast constants 2011-12-09 23:38:41 +01:00
Gael Guennebaud
fb3aa7220f reimplement abs2 not to use std::norm which is incredibly slow. 2011-11-08 22:42:51 +01:00
Gael Guennebaud
22bff949c8 protect calls to min and max with parentheses to make Eigen compatible with default windows.h
(transplanted from 49b6e9143e1d74441924c0c313536e263e12a55c
)
2011-07-21 11:19:36 +02:00
Gael Guennebaud
87ac09daa8 Simplify the use of custom scalar types, the rule is to never directly call a standard math function using std:: but rather put a using std::foo before and simply call foo:
using std::max;
max(a,b);
2011-05-25 08:41:45 +02:00
Gael Guennebaud
aea630a98a factorize implementation of standard real unary math functions, and add acos, asin 2011-02-17 17:37:11 +01:00
Benoit Jacob
ba9f6a2c3b now random<integer types> spans over 0..RAND_MAX, or -RAND_MAX/2..RAND_MAX/2 for signed types, or the most significant bits for smaller integer types. 2011-02-07 10:55:41 -05:00
Gael Guennebaud
2f71277105 add global tan function 2011-02-03 14:45:21 +01:00
Benoit Jacob
96f08213f7 big eigen2support fix, aimed at users who relied on internal eigen2 stuff: now we dont need customizations in test/eigen2/main.h anymore.
These tests already build:
eigen2_basicstuff
eigen2_adjoint
eigen2_linearstructure
eigen2_prec_inverse_4x4
2011-01-19 11:01:07 -05:00
Hauke Heibel
bf9d25ce58 Postfixed add_const and remove_const by _on_value_type to express the differences to the STL. 2010-11-26 16:30:45 +01:00
Gael Guennebaud
156a31b0e9 fully implement scalar_fuzzy_impl<bool> as, e.g., the missing isMuchSmallerThan is convenient to filter out false values. 2010-11-25 18:00:30 +01:00
Hauke Heibel
7bc8e3ac09 Initial fixes for bug #85.
Renamed meta_{true|false} to {true|false}_type, meta_if to conditional, is_same_type to is_same, un{ref|pointer|const} to remove_{reference|pointer|const} and makeconst to add_const.
Changed boolean type 'ret' member to 'value'.
Changed 'ret' members refering to types to 'type'.
Adapted all code occurences.
2010-10-25 22:13:49 +02:00
Benoit Jacob
4716040703 bug #86 : use internal:: namespace instead of ei_ prefix 2010-10-25 10:15:22 -04:00
Benoit Jacob
aaaade4b3d the Index types change.
As discussed on the list (too long to explain here).
2010-05-30 16:00:58 -04:00
Thomas Capricelli
aadea5ae56 fix a warning 2010-05-21 02:13:16 +02:00
Thomas Capricelli
4daba0750e fix some warnings with clang 2010-05-21 01:46:17 +02:00
Hauke Heibel
6ea6276f20 Quiet MSVC. 2010-05-04 14:06:41 +02:00
Benoit Jacob
8f249e8b54 fix compilation: const (T&) != const T& , use ei_makeconst 2010-04-30 14:28:35 -04:00
Benoit Jacob
cf4f90ccea fix #116 and remove debug cout's 2010-04-30 11:58:17 -04:00
Benoit Jacob
5d63d2cc4b * kill the retval typedefs, instead introduce ei_xxx_retval which does the job automatically in 99% cases and can be specialized
* add real/imag/abs2 global functions for Array
* document ei_global_math_functions_filtering_base
* improve unit tests
2010-04-28 22:42:34 -04:00
Benoit Jacob
e277586958 Complete rework of global math functions and NumTraits.
* Now completely generic so all standard integer types (like char...) are supported.
** add unit test for that (integer_types).
* NumTraits does no longer inherit numeric_limits
* All math functions are now templated
* Better guard (static asserts) against using certain math functions on integer types.
2010-04-28 18:51:38 -04:00
Thomas Capricelli
29a3aec483 erf() is really non standard, better dont pollute eigen with it. 2010-04-19 02:06:11 +02:00
Hauke Heibel
031932b4ec Disabled erf also for Cygwin where it is not supported and causes errors. 2010-04-18 20:08:56 +02:00
Hauke Heibel
7db0f242ef Disabled unsupported erf on MSVC machines. 2010-04-18 14:37:44 +02:00
Thomas Capricelli
f1deab0e5a introduce ei_erf() for various scalar type 2010-04-18 03:39:22 +02:00
Benoit Jacob
16e416b8d7 generalize the idea of the previous commit to all kinds of casts, see this forum thread:
http://forum.kde.org/viewtopic.php?f=74&t=86914
this  is important to allow users to support custom types that don't have the needed conversion operators.
2010-03-30 14:47:45 -04:00
Benoit Jacob
9e0d8697c7 add ei_cast_to_int, we are indeed somethings (e.g. in IO.h) casting scalars to int and the only way to allow users to extend that to their own scalar types that don't have int cast operators, was to allow them specialize ei_cast_to_int_impl. 2010-03-30 14:16:54 -04:00
Piotr Trojanek
1701a5d1f8 std:: namespace fixup for more restricive compilers such as QNX's QCC 2010-02-10 13:24:47 +01:00
Hauke Heibel
ae0a17d30b Here is the proper fix. 2010-02-11 11:39:02 +01:00
Hauke Heibel
93e86b0884 Fixed typos.
Replace NumTraits<bool>::dummy_precision() (three locations) by false in order to suppress warnings.
2010-02-11 11:31:22 +01:00
Gael Guennebaud
fe0827495a * move dummy_precision and epsilon to NumTraits
* make NumTraits inherits std::numeric_limits
2010-02-10 10:52:28 +01:00
Trevor Irons
5f0cf1d7f6 Added std::sqrt(std::complex<float>) and std::sqrt(std::complex<double>) support to MathFunctions.h 2010-01-07 15:03:51 -07:00