55 Commits
Author SHA1 Message Date
Florian Maurin 83184e67da Cleanup: Modernize internal utilities for C++14
libeigen/eigen!2518
2026-05-07 16:43:22 -07:00
Rasmus Munk LarsenandRasmus Munk Larsen 8a3d61c790 Licensing: SPDX identifiers, REUSE.toml, and checkformat:reuse CI job
libeigen/eigen!2509

Closes #2868

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
2026-05-04 00:36:12 +00:00
Rasmus Munk LarsenandRasmus Munk Larsen 64885cc6a3 Fix remaining MSVC warnings in Windows CI (C4804, C4244, C4146, C4305)
libeigen/eigen!2374

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
2026-04-01 17:20:31 -07:00
Rasmus Munk LarsenandRasmus Munk Larsen c1faa74738 Add boundary test coverage: stableNorm, LinSpaced, complex GEMV, triangular solve
libeigen/eigen!2291

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
2026-03-12 18:15:30 -07:00
Charles Schlosser 875fb48f0a fix various irksome compiler warnings
libeigen/eigen!2280
2026-03-11 21:01:20 -07:00
Rasmus Munk Larsen 42b6c43cfe Revert "Remove random retry loops in tests (batch 2: indices and integer types)"
This reverts merge request !2261
2026-03-09 20:01:53 -07:00
Rasmus Munk LarsenandRasmus Munk Larsen 7c3a344763 Remove random retry loops in tests (batch 2: indices and integer types)
libeigen/eigen!2261

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
2026-03-08 11:02:45 -07:00
Rasmus Munk LarsenandRasmus Munk Larsen be7538ed65 Remove random retry loops in tests (batch 1: simple scalar cases)
libeigen/eigen!2260

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
2026-03-08 10:44:57 -07:00
Rasmus Munk LarsenandRasmus Munk Larsen d5e67adbe7 Clean up informal language, vague TODOs, and dead code in comments
libeigen/eigen!2191

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
2026-02-22 18:32:10 -08:00
Antonio Sánchez 46e9cdb7fe Clang-format tests, examples, libraries, benchmarks, etc. 2023-12-05 21:22:55 +00:00
Charles Schlosser 2004831941 add EqualSpaced / setEqualSpaced 2022-12-13 00:54:57 +00:00
Erik Schultheis d271a7d545 reduce float warnings (comparisons and implicit conversions) 2022-01-26 18:16:19 +00:00
Gael Guennebaud e23bf40dc2 Add unit test for LinSpaced and complex numbers. 2019-02-18 22:03:47 +01:00
Gael Guennebaud 48fe78c375 bug #1630: fix linspaced when requesting smaller packet size than default one. 2018-11-28 13:15:06 +01:00
Gael Guennebaud dff3a92d52 Remove usage of #if EIGEN_TEST_PART_XX in unit tests that does not require them (splitting can thus be avoided for them) 2018-07-17 15:52:58 +02:00
Gael Guennebaud 82f0ce2726 Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }.
This provide several advantages:
- more flexibility in designing unit tests
- unit tests can be glued to speed up compilation
- unit tests are compiled with same predefined macros, which is a requirement for zapcc
2018-07-17 14:46:15 +02:00
Gael Guennebaud 9deee79922 bug #1457: add setUnit() methods for consistency. 2017-08-22 16:48:07 +02:00
Gael Guennebaud 850ca961d2 bug #1383: fix regression in LinSpaced for integers and high<low 2017-01-25 18:13:53 +01:00
Gael Guennebaud d06a48959a bug #1383: Fix regression from 3.2 with LinSpaced(n,0,n-1) with n==0. 2017-01-25 15:27:13 +01:00
Gael Guennebaud a07bb428df bug #1004: improve accuracy of LinSpaced for abs(low) >> abs(high). 2016-11-02 11:34:38 +01:00
Gael Guennebaud 58146be99b bug #1004: one more rewrite of LinSpaced for floating point numbers to guarantee both interpolation and monotonicity.
This version simply does low+i*step plus a branch to return high if i==size-1.
Vectorization is accomplished with a branch and the help of pinsertlast.
Some quick benchmark revealed that the overhead is really marginal, even when filling small vectors.
2016-10-25 16:53:09 +02:00
Gael Guennebaud b027d7a8cf bug #1004: remove the inaccurate "sequential" path for LinSpaced, mark respective function as deprecated, and enforce strict interpolation of the higher range using a correction term.
Now, even with floating point precision, both the 'low' and 'high' bounds are exactly reproduced at i=0 and i=size-1 respectively.
2016-10-24 20:27:21 +02:00
Gael Guennebaud 53c77061f0 bug #698: rewrite LinSpaced for integer scalar types to avoid overflow and guarantee an even spacing when possible.
Otherwise, the "high" bound is implicitly lowered to the largest value allowing for an even distribution.
This changeset also disable vectorization for this integer path.
2016-10-24 15:50:27 +02:00
Gael Guennebaud e8e56c7642 Add unit test for overflow in LinSpaced 2016-10-24 15:43:51 +02:00
Gael Guennebaud b046a3f87d Workaround MSVC instantiation faillure of has_*ary_operator at the level of triats<Ref>::match so that the has_*ary_operator are really properly instantiated throughout the compilation unit. 2016-09-06 15:47:04 +02:00
Gael Guennebaud e13071dd13 Workaround a weird msvc 2012 compilation error. 2016-09-05 15:50:41 +02:00
Gael Guennebaud 218c37beb4 bug #1286: automatically detect the available prototypes of functors passed to CwiseNullaryExpr such that functors have only to implement the operators that matters among:
operator()()
 operator()(i)
 operator()(i,j)
Linear access is also automatically detected based on the availability of operator()(i,j).
2016-08-31 15:45:25 +02:00
Gael Guennebaud 6e0a86194c Fix integer path for num_steps==1 2016-02-01 15:00:04 +01:00
Gael Guennebaud e1d219e5c9 bug #698: fix linspaced for integer types. 2016-02-01 14:25:34 +01:00
Gael Guennebaud dd934ad057 Re-enable vectorization of LinSpaced, plus some cleaning 2015-10-08 17:27:01 +02:00
Gael Guennebaud fc202bab39 Index refactoring: StorageIndex must be used for storage only (and locally when it make sense). In all other cases use the global Index type. 2015-02-13 18:57:41 +01:00
Gael Guennebaud fe51319980 Merge Index-refactoring branch with default, fix PastixSupport, remove some useless typedefs 2015-02-13 10:03:53 +01:00
Gael Guennebaud 99501a2c4c Fix wrong negative in nullary unit test when extended precision is used (FPU). 2014-12-16 16:23:47 +01:00
Christoph Hertzberg e8cdbedefb bug #877, bug #572: Introduce a global Index typedef. Rename Sparse*::Index to StorageIndex, make Dense*::StorageIndex an alias to DenseIndex. Overall this commit gets rid of all Index conversion warnings. 2014-12-04 22:48:53 +01:00
Jitse Niesen b4f6aec195 Fix linear vectorized transversal in linspace (fixes bug #526). 2013-02-18 17:26:03 +00:00
Benoit Jacob 69124cfca2 Automatic relicensing to MPL2 using Keirs script. Manual fixup follows. 2012-07-13 14:42:47 -04:00
Hauke Heibel c08521ea6b Improved the unit tests for setLinSpaced.
Provide a default constructed step size as opposed to an int when the size is 1.
2012-03-07 16:18:35 +01:00
Hauke Heibel ef022da28e Fixed setLinSpaced for size==1. 2012-03-07 15:34:39 +01:00
Gael Guennebaud 42e2578ef9 the min/max macros to detect unprotected min/max were undefined by some std header,
so let's declare them after and do the respective fixes ;)
2011-08-19 14:18:05 +02:00
Jitse Niesen c6ad2deead Bug fix in linspace_op::packetOp(row,col). Fixes bug #232.
Also, add regression test.
2011-03-24 10:42:11 +00:00
Jitse Niesen e7d2376688 Change int to Index in equalsIdentity().
This fixes compilation errors in nullary test on 64-bits machines.
2011-03-11 11:06:13 +00:00
Jitse Niesen 151e3294cf Fix equalsIdentity() for rectangular matrices. 2011-03-10 13:49:06 +00:00
Gael Guennebaud c6c6c34909 repeat nullary tests, and fix some tests 2011-03-07 16:41:59 +01:00
Benoit Jacob 4716040703 bug #86 : use internal:: namespace instead of ei_ prefix 2010-10-25 10:15:22 -04:00
Hauke Heibel 9f8b6ad43e Fixed bug #79. 2010-10-19 09:43:54 +02:00
Hauke Heibel 734469e43f Unified LinSpaced in order to be conform with other setter methods as e.g. Constant. 2010-07-22 14:04:00 +02:00
Carlos Becker 97f3c7f282 Fixed nullary test not passing on Core Duo 2010-06-30 19:17:29 +01:00
Gael Guennebaud 768bdd08c8 fix bad tests 2010-06-28 01:01:29 +02:00
Hauke Heibel bb46a45340 Finally fixed the matrix function/exponential warning.
Index fixes.
2010-06-20 23:13:24 +02:00
Hauke Heibel f1679c7185 Utilize Index in all unit tests. 2010-06-20 17:37:56 +02:00