Commit Graph

1869 Commits

Author SHA1 Message Date
Gael Guennebaud
1b2049fbda Enforce scalar types in calls to max/min (helps with expression template scalar types) 2016-07-25 12:35:10 +02:00
Gael Guennebaud
32d95e86c9 merge 2016-07-22 16:43:12 +02:00
Gael Guennebaud
60d5980a41 add a note 2016-07-22 15:46:23 +02:00
Gael Guennebaud
24af67a6cc Fix boostmultiprec for C++03 2016-07-22 15:30:54 +02:00
Gael Guennebaud
d075d122ea Move half unit test from unsupported to main tests 2016-07-22 14:34:19 +02:00
Gael Guennebaud
72950effdf enable testing of Boost.Multiprecision with expression templates 2016-07-20 18:21:30 +02:00
Gael Guennebaud
b64b9d0172 Add a unit test to stress our solvers with Boost.Multiprecision 2016-07-20 15:20:14 +02:00
Gael Guennebaud
5e4dda8a12 Enable custom scalar types in some unit tests. 2016-07-20 15:19:17 +02:00
Gael Guennebaud
87d480d785 Make use of EIGEN_TEST_MAX_SIZE 2016-07-20 15:14:20 +02:00
Gael Guennebaud
9e8476ef22 Add missing Eigen::rsqrt global function 2016-07-20 11:59:49 +02:00
Gael Guennebaud
db9b154193 Add missing non-const reverse method in VectorwiseOp. 2016-07-16 15:19:28 +02:00
Gael Guennebaud
263993a7b6 Fix test for nearly null input 2016-07-12 17:19:26 +02:00
Benoit Steiner
03b71c273e Made the packetmath test compile again. A better fix would be to move the special function tests to the unsupported directory where the code now resides. 2016-07-11 13:50:24 -07:00
Gael Guennebaud
fd60966310 merge 2016-07-11 18:11:47 +02:00
Gael Guennebaud
57113e00f9 Relax strict equality 2016-07-09 23:37:11 +02:00
Gael Guennebaud
2f7e2614e7 bug #1232: refactor special functions as a new SpecialFunctions module, currently in unsupported/. 2016-07-08 11:13:55 +02:00
Gael Guennebaud
c684e37d32 Prevent division by zero. 2016-07-07 11:03:01 +02:00
Gael Guennebaud
5ca2457fa5 Fix unit test. 2016-07-06 22:25:24 +02:00
Gael Guennebaud
9b68ed4537 Relax is_equal to is_approx because scaling might modify last bit. 2016-07-06 15:02:49 +02:00
Gael Guennebaud
5b3a6f51d3 Improve numerical robustness of RealSchur: add scaling and compare sub-diag entries to largest diagonal entry instead of the 2 neighbors. 2016-07-06 13:45:30 +02:00
Gael Guennebaud
d2b5a19e0f Fix warning. 2016-07-06 11:05:30 +02:00
Gael Guennebaud
43696ede8f Revert unwanted changes. 2016-07-04 22:40:36 +02:00
Gael Guennebaud
b39fd8217f Fix nesting of SolveWithGuess, and add unit test. 2016-07-04 17:47:47 +02:00
Gael Guennebaud
fbcfc2f862 Add unit test for solveWithGuess, and fix template resolution. 2016-07-04 17:19:38 +02:00
Gael Guennebaud
32a41ee659 bug #707: add inplace decomposition through Ref<> for Cholesky, LU and QR decompositions. 2016-07-04 15:13:35 +02:00
Gael Guennebaud
e61cee7a50 Fix compilation of some unit tests with msvc 2016-07-04 11:49:03 +02:00
Gael Guennebaud
d476cadbb8 bug #1247: fix regression in compilation of pow(integer,integer), and add respective unit tests. 2016-06-25 10:12:06 +02:00
Gael Guennebaud
7c6561485a merge PR 194 2016-06-23 15:29:57 +02:00
Gael Guennebaud
76faf4a965 Introduce a NumTraits<T>::Literal type to be used for literals, and
improve mixing type support in operations between arrays and scalars:
 - 2 * ArrayXcf is now optimized in the sense that the integer 2 is properly promoted to a float instead of a complex<float> (fix a regression)
 - 2.1 * ArrayXi is now forbiden (previously, 2.1 was converted to 2)
 - This mechanism should be applicable to any custom scalar type, assuming NumTraits<T>::Literal is properly defined (it defaults to T)
2016-06-23 14:27:20 +02:00
Gael Guennebaud
a3f7edf7e7 Biug 1242: fix comma init with empty matrices. 2016-06-23 10:25:04 +02:00
Gael Guennebaud
76236cdea4 merge 2016-06-14 15:33:47 +02:00
Gael Guennebaud
70dad84b73 Generalize expr/expr and scalar/expr wrt scalar types. 2016-06-14 15:26:37 +02:00
Gael Guennebaud
396d9cfb6e Generalize expr.pow(scalar), pow(expr,scalar) and pow(scalar,expr).
Internal: scalar_pow_op (unary) is removed, and scalar_binary_pow_op is renamed scalar_pow_op.
2016-06-14 14:10:07 +02:00
Gael Guennebaud
a8c08e8b8e Implement expr+scalar, scalar+expr, expr-scalar, and scalar-expr as binary expressions, and generalize supported scalar types.
The following functors are now deprecated: scalar_add_op, scalar_sub_op, and scalar_rsub_op.
2016-06-14 12:06:10 +02:00
Gael Guennebaud
12350d3ac7 Add unit test for AlignedBox::center 2016-06-14 11:31:52 +02:00
Gael Guennebaud
bcc0f38f98 Add unittesting plugins to scalar_product_op and scalar_quotient_op to help chaking that types are properly propagated. 2016-06-14 11:31:27 +02:00
Gael Guennebaud
64fcfd314f Implement scalar multiples and division by a scalar as a binary-expression with a constant expression.
This slightly complexifies the type of the expressions and implies that we now have to distinguish between scalar*expr and expr*scalar to catch scalar-multiple expression (e.g., see BlasUtil.h), but this brings several advantages:
- it makes it clear on each side the scalar is applied,
- it clearly reflects that we are dealing with a binary-expression,
- the complexity of the type is hidden through macros defined at the end of Macros.h,
- distinguishing between "scalar op expr" and "expr op scalar" is important to support non commutative fields (like quaternions)
- "scalar op expr" is now fully equivalent to "ConstantExpr(scalar) op expr"
- scalar_multiple_op, scalar_quotient1_op and scalar_quotient2_op are not used anymore in officially supported modules (still used in Tensor)
2016-06-14 11:26:57 +02:00
Gael Guennebaud
39781dc1e2 Fix compilation of evaluator unit test 2016-06-14 11:03:26 +02:00
Gael Guennebaud
2ca2ffb65e check for mixing types in "array / scalar" expressions 2016-06-13 16:15:32 +02:00
Gael Guennebaud
a3a4714aba Add debug output. 2016-06-11 14:41:53 +02:00
Gael Guennebaud
5de8d7036b Add real.pow(complex), complex.pow(real) unit tests. 2016-06-10 15:58:22 +02:00
Gael Guennebaud
3d71d3918e Disable shortcuts for res ?= prod when the scalar types do not match exactly. 2016-06-06 23:10:55 +02:00
Gael Guennebaud
66e99ab6a1 Relax mixing-type constraints for binary coefficient-wise operators:
- Replace internal::scalar_product_traits<A,B> by Eigen::ScalarBinaryOpTraits<A,B,OP>
- Remove the "functor_is_product_like" helper (was pretty ugly)
- Currently, OP is not used, but it is available to the user for fine grained tuning
- Currently, only the following operators have been generalized: *,/,+,-,=,*=,/=,+=,-=
- TODO: generalize all other binray operators (comparisons,pow,etc.)
- TODO: handle "scalar op array" operators (currently only * is handled)
- TODO: move the handling of the "void" scalar type to ScalarBinaryOpTraits
2016-06-06 15:11:41 +02:00
Eugene Brevdo
c53687dd14 Add randomized properties tests for betainc special function. 2016-06-05 11:10:30 -07:00
Gael Guennebaud
15890c304e Add unit test for non symmetric generalized eigenvalues 2016-06-09 16:17:27 +02:00
Christoph Hertzberg
9dd9d58273 Copied a regression test from 3.2 branch. 2016-06-08 15:36:42 +02:00
Eugene Brevdo
39baff850c Add TernaryFunctors and the betainc SpecialFunction.
TernaryFunctors and their executors allow operations on 3-tuples of inputs.
API fully implemented for Arrays and Tensors based on binary functors.

Ported the cephes betainc function (regularized incomplete beta
integral) to Eigen, with support for CPU and GPU, floats, doubles, and
half types.

Added unit tests in array.cpp and cxx11_tensor_cuda.cu


Collapsed revision
* Merged helper methods for betainc across floats and doubles.
* Added TensorGlobalFunctions with betainc().  Removed betainc() from TensorBase.
* Clean up CwiseTernaryOp checks, change igamma_helper to cephes_helper.
* betainc: merge incbcf and incbd into incbeta_cfe.  and more cleanup.
* Update TernaryOp and SpecialFunctions (betainc) based on review comments.
2016-06-02 17:04:19 -07:00
Gael Guennebaud
82293f38d6 Fix unit test. 2016-06-03 08:12:14 +02:00
Gael Guennebaud
8b6f53222b bug #1193: fix lpNorm<Infinity> for empty input. 2016-06-02 15:29:59 +02:00
Gael Guennebaud
d616a81294 Disable MSVC's "decorated name length exceeded, name was truncated" warning in unit tests. 2016-06-02 14:48:38 +02:00