Re: [eigen] Addition to Eigen-unsupported Spline module |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
On 24.06.2014 12:24, Hauke Heibel wrote:
What Christoph said backs up introducing a new typedef like e.g.
EIGEN_MAKE_ARRAY_TYPEDEFS_ALL_SIZES(DenseIndex, Idx)
Are there any objections about doing this? I am fine with it. That's all
which keeps us from merging.
Well, I'm not objecting this, but I think it would be much easier to
simply accept any type for derivativeIndices (the same as you do for
PointArrayType). Then the code would work for Eigen::ArrayXi as well as
std::vector<short>, etc, and you would not need to introduce a new typedef.
I doubt that anyone will have splines with more than 2^31 nodes in the
near future, so requiring 64 bit indexes seems a bit over-engineered for
this (for people requiring this it would be possible, nonetheless).
For a clean solution, I'd like to have some kind of static assertion
which ensures `typename IndexArray` has a size() method, and an
operator[] which returns an integer type. Later on specializations which
determine if the size is fixed at compile-time might come handy.
Regards,
Christoph
--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen
Tel: +49 (421) 218-64252
----------------------------------------------