Re: [eigen] On the implementation of STL iterator for Eigen::Matrix |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] On the implementation of STL iterator for Eigen::Matrix*From*: Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx>*Date*: Tue, 2 Oct 2018 15:28:19 +0200

Hi, thanks for the interest! On 2018-10-02 15:14, Brook Milligan wrote:

On Oct 2, 2018, at 6:38 PM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote: we're eventually implementing STL iterators to iterator over the coefficients of a vector/matrix as well as over the columns or rows of a matrix, and your inputs might be welcome to help converging to a stable API, see below. You can watch the WIP in PR 519 [1], and find some background in bug 231 [2]. Basically, to avoid ambiguities, we decided that iterators over coefficients would be defined for 1D expression only, meaning that to iterate over the elements of a 2D Matrix you'll have to explicitly reshape it as a 1D vector first.Have you considered a solution such as used by Boost GIL (Generic Image Library)? That has the concept of "pixel locators" which allow both 1-D and 2-D (i.e., up/down, right/left) movement through the pixels of an image. In fact, I would be surprised if you cannot adapt a matrix to the GIL "image" concept and get a whole lot for free. In any case, I think it would be worth investigating before you settle on the arbitrary restriction of a 1-D-only API.

Christoph -- Dr.-Ing. Christoph Hertzberg Besuchsadresse der Nebengeschäftsstelle: DFKI GmbH Robotics Innovation Center Robert-Hooke-Straße 5 28359 Bremen, Germany Postadresse der Hauptgeschäftsstelle Standort Bremen: DFKI GmbH Robotics Innovation Center Robert-Hooke-Straße 1 28359 Bremen, Germany Tel.: +49 421 178 45-4021 Zentrale: +49 421 178 45-0 E-Mail: christoph.hertzberg@xxxxxxx Weitere Informationen: http://www.dfki.de/robotik ----------------------------------------------------------------------- Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 Sitz der Gesellschaft: Kaiserslautern (HRB 2313) USt-Id.Nr.: DE 148646973 Steuernummer: 19/672/50006 -----------------------------------------------------------------------

**References**:**[eigen] On the implementation of STL iterator for Eigen::Matrix***From:*Gael Guennebaud

**Re: [eigen] On the implementation of STL iterator for Eigen::Matrix***From:*Brook Milligan

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] On the implementation of STL iterator for Eigen::Matrix** - Next by Date:
**Re: [eigen] On the implementation of STL iterator for Eigen::Matrix** - Previous by thread:
**Re: [eigen] On the implementation of STL iterator for Eigen::Matrix** - Next by thread:
**Re: [eigen] On the implementation of STL iterator for Eigen::Matrix**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |