Antonio Sánchez
46e9cdb7fe
Clang-format tests, examples, libraries, benchmarks, etc.
2023-12-05 21:22:55 +00:00
Antonio Sánchez
2260e11eb0
Fix reshape strides when input has non-zero inner stride.
2022-11-29 19:39:29 +00:00
Erik Schultheis
421cbf0866
Replace Eigen type metaprogramming with corresponding std types and make use of alias templates
2022-03-16 16:43:40 +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
Gael Guennebaud
4b7cf7ff82
Extend reshaped unit tests and remove useless const_cast
2019-01-17 17:35:32 +01:00
Gael Guennebaud
5f26f57598
Change the logic of A.reshaped<Order>() to be a simple alias to A.reshaped<Order>(AutoSize,fix<1>).
...
This means that now AutoOrder is allowed, and it always return a column-vector.
2018-10-03 11:41:47 +02:00
Gael Guennebaud
1bf12880ae
Add reshaped<>() shortcuts when returning vectors and remove the reshaping version of operator()(all)
2018-09-21 16:50:04 +02:00
Gael Guennebaud
a488d59787
merge with default Eigen
2018-09-21 11:51:49 +02:00
Gael Guennebaud
dfa8439e4d
Update reshaped API to use RowMajor/ColMajor directly as integral values instead of introducing RowOrder/ColOrder types.
...
The API changed from A.respahed(rows,cols,RowOrder) to A.template reshaped<RowOrder>(rows,cols).
2018-09-19 11:49:26 +02:00
Gael Guennebaud
3d200257d7
Add support for automatic-size deduction in reshaped, e.g.:
...
mat.reshaped(4,AutoSize); <-> mat.reshaped(4,mat.size()/4);
2017-02-21 15:57:25 +01:00
Gael Guennebaud
f8179385bd
Add missing const version of mat(all).
2017-02-21 13:56:26 +01:00
Gael Guennebaud
b3fc0007ae
Add support for mat(all) as an alias to mat.reshaped(mat.size(),fix<1>);
2017-02-21 13:49:09 +01:00
Gael Guennebaud
9081c8f6ea
Add support for RowOrder reshaped
2017-02-20 11:46:21 +01:00
Gael Guennebaud
4b22048cea
Fallback Reshaped to MapBase when possible (same storage order and linear access to the nested expression)
2017-02-11 15:32:53 +01:00
Gael Guennebaud
24409f3acd
Use fix<> API to specify compile-time reshaped sizes.
2017-01-29 15:20:35 +01:00
Gael Guennebaud
9036cda364
Cleanup intitial reshape implementation:
...
- reshape -> reshaped
- make it compatible with evaluators.
2017-01-29 14:57:45 +01:00
yoco
15f273b63c
fix reshape flag and test case
2014-02-10 22:49:13 +08:00
yoco
515bbf8bb2
Improve reshape test case
...
- simplify test code
- add reshape chain
2014-02-04 02:50:23 +08:00
yoco
2b89080903
Remove reshape InnerPanel, add test, fix bug
2014-01-20 01:43:28 +08:00
yoco
24e1c0f2a1
add reshape test for const and static-size matrix
2014-01-18 23:27:53 +08:00
yoco
150796337a
Add unit-test for reshape
...
- add unittest for dynamic & fixed-size reshape
- fix fixed-size reshape bugs bugs found while testing
2014-01-18 16:10:46 +08:00