Erik Schultheis
ec4efbd696
remove EIGEN_HAS_CXX11
2021-11-24 20:08:49 +00:00
Antonio Sanchez
5dac0b53c9
Move Eigen::all,last,lastp1,lastN to Eigen::placeholders::.
...
These names are so common, IMO they should not exist directly in the
`Eigen::` namespace. This prevents us from using the `last` or `all`
names for any parameters or local variables, otherwise spitting out
warnings about shadowing or hiding the global values. Many external
projects (and our own examples) also heavily use
```
using namespace Eigen;
```
which means these conflict with external libraries as well, e.g.
`std::fill(first,last,value)`.
It seems originally these were placed in a separate namespace
`Eigen::placeholders`, which has since been deprecated. I propose
to un-deprecate this, and restore the original locations.
These symbols are also imported into `Eigen::indexing`, which
additionally imports `fix` and `seq`. An alternative is to remove the
`placeholders` namespace and stick with `indexing`.
NOTE: this is an API-breaking change.
Fixes #2321 .
2021-09-17 10:21:42 -07:00
Rasmus Munk Larsen
d7d0bf832d
Issue an error in case of direct inclusion of internal headers.
2021-09-10 19:12:26 +00:00
Gael Guennebaud
bd9a00718f
Let doxygen sees lastN
2018-11-09 11:35:48 +01:00
Gael Guennebaud
617f75f117
Add indexing namespace
2018-09-20 22:57:10 +02:00
Gael Guennebaud
2014c7ae28
Move all, last, end from Eigen::placeholders namespace to Eigen::, and rename end to lastp1 to avoid conflicts with std::end.
2018-09-15 14:35:10 +02:00
Gael Guennebaud
82772e8d9d
Rename Symbolic namespace to symbolic to be consistent with numext namespace
2018-09-15 14:16:20 +02:00
Gael Guennebaud
c747cde69a
Add lastN shorcuts to seq/seqN.
2018-07-23 16:20:25 +02:00
Gael Guennebaud
6486d4fc95
Worakound gcc 4.7 issue in c++11.
2017-02-11 10:29:10 +01:00
Gael Guennebaud
d83db761a2
Add support for std::integral_constant
2017-01-24 16:28:12 +01:00
Gael Guennebaud
c43d254d13
Fix seq().reverse() in c++98
2017-01-24 11:36:43 +01:00
Gael Guennebaud
41c523a0ab
Rename fix_t to FixedInt
2017-01-24 09:39:49 +01:00
Gael Guennebaud
4d302a080c
Recover compile-time size from seq(A,B) when A and B are fixed values. (c++11 only)
2017-01-19 20:34:18 +01:00
Gael Guennebaud
54f3fbee24
Exploit fixed values in seq and reverse with C++98 compatibility
2017-01-19 19:57:32 +01:00
Gael Guennebaud
e84ed7b6ef
Remove dead code
2017-01-18 23:18:28 +01:00
Gael Guennebaud
f3ccbe0419
Add a Symbolic::FixedExpr helper expression to make sure the compiler fully optimize the usage of last and end.
2017-01-18 23:16:32 +01:00
Gael Guennebaud
15471432fe
Add a .reverse() member to ArithmeticSequence.
2017-01-18 11:35:27 +01:00
Gael Guennebaud
71e5b71356
Add a get_runtime_value helper to deal with pointer-to-function hack,
...
plus some refactoring to make the internals more consistent.
2017-01-17 11:33:57 +01:00
Gael Guennebaud
4989922be2
Add support for symbolic expressions as arguments of operator()
2017-01-16 22:21:23 +01:00
Gael Guennebaud
e70c4c97fa
Typo
2017-01-16 16:20:16 +01:00
Gael Guennebaud
a9232af845
Introduce a variable_or_fixed<N> proxy returned by fix<N>(val) to pass both a compile-time and runtime fallback value in case N means "runtime".
...
This mechanism is used by the seq/seqN functions. The proxy object is immediately converted to pure compile-time (as fix<N>) or pure runtime (i.e., an Index) to avoid redundant template instantiations.
2017-01-16 16:17:01 +01:00
Gael Guennebaud
752bd92ba5
Large code refactoring:
...
- generalize some utilities and move them to Meta (size(), array_size())
- move handling of all and single indices to IndexedViewHelper.h
- several cleanup changes
2017-01-11 17:24:02 +01:00
Gael Guennebaud
b1dc0fa813
Move fix and symbolic to their own file, and improve doxygen compatibility
2017-01-11 14:28:28 +01:00
Gael Guennebaud
1b5570988b
Add doc to seq, seqN, ArithmeticSequence, operator(), etc.
2017-01-10 22:58:58 +01:00
Gael Guennebaud
c9d5e5c6da
Simplify Symbolic API: std::tuple is now used internally and automatically built.
2017-01-10 16:55:07 +01:00
Gael Guennebaud
407e7b7a93
Simplify symbolic API by using "symbol=value" to associate a runtime value to a symbol.
2017-01-10 16:45:32 +01:00
Gael Guennebaud
96e6cf9aa2
Fix linking issue.
2017-01-10 16:35:46 +01:00
Gael Guennebaud
8e247744a4
Fix linking issue
2017-01-10 16:32:06 +01:00
Gael Guennebaud
87963f441c
Fallback to Block<> when possible (Index, all, seq with > increment).
...
This is important to take advantage of the optimized implementations (evaluator, products, etc.),
and to support sparse matrices.
2017-01-10 14:25:30 +01:00
Gael Guennebaud
a98c7efb16
Add a more generic evaluation mechanism and minimalistic doc.
2017-01-10 11:46:29 +01:00
Gael Guennebaud
13d954f270
Cleanup Eigen's namespace
2017-01-10 11:06:02 +01:00
Gael Guennebaud
9eaab4f9e0
Refactoring: move all symbolic stuff into its own namespace
2017-01-10 10:57:08 +01:00
Gael Guennebaud
acd08900c9
Move 'last' and 'end' to their own namespace
2017-01-10 10:31:07 +01:00
Gael Guennebaud
1df2377d78
Implement c++98 version of seq()
2017-01-10 10:28:45 +01:00
Gael Guennebaud
ecd9cc5412
Isolate legacy code (we keep it for performance comparison purpose)
2017-01-10 09:34:25 +01:00
Gael Guennebaud
b50c3e967e
Add a minimalistic symbolic scalar type with expression template and make use of it to define the last placeholder and to unify the return type of seq and seqN.
2017-01-09 23:42:16 +01:00
Gael Guennebaud
68064e14fa
Rename span/range to seqN/seq
2017-01-09 17:35:21 +01:00
Gael Guennebaud
75aef5b37f
Fix extraction of compile-time size of std::array with gcc
2017-01-06 22:04:49 +01:00
Gael Guennebaud
76e183bd52
Propagate compile-time size for plain arrays
2017-01-06 22:01:23 +01:00
Gael Guennebaud
3264d3c761
Add support for plain-array as indices, e.g., mat({1,2,3,4})
2017-01-06 21:53:32 +01:00
Gael Guennebaud
a875167d99
Propagate compile-time increment and strides.
...
Had to introduce a UndefinedIncr constant for non structured list of indices.
2017-01-06 15:54:55 +01:00
Gael Guennebaud
fad1fa75b3
Propagate compile-time size with "all" and add c++11 array unit test
2017-01-06 13:29:33 +01:00
Gael Guennebaud
3730e3ca9e
Use "fix" for compile-time values, propagate compile-time sizes for span, clean some cleanup.
2017-01-06 13:10:10 +01:00
Gael Guennebaud
ac7e4ac9c0
Initial commit to add a generic indexed-based view of matrices.
...
This version already works as a read-only expression.
Numerous refactoring, renaming, extension, tuning passes are expected...
2017-01-06 00:01:44 +01:00