Re: [eigen] Iterators with dense matrices: (was: Areas of eigen3 variation and using eigen2/3 in generic code)

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



On Mon, Jan 4, 2010 at 9:23 AM, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx> wrote:
On Mon, Jan 4, 2010 at 2:59 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
Thanks a lot for the explanation.

Is this completely specific to uBlas or are there other Boost
libraries standardizing on the same interface? uBlas alone is not

A few general thoughts on this stuff.
So my suggestions would be:

1) Iteration for Vectors/slices of matrices/etc.:
  • To me this is the first-order concern and would prevent me from using Eigen.  I have a lot of code that uses vectors and multi_arrays for interpolation, etc. and I can't live without std::binary_search to bracket results efficiently
  • The specifications for this are easy: http://www.sgi.com/tech/stl/RandomAccessContainer.html
  • I think it is reasonable to drop a couple of the requirements on the Concept here, but I am not sure if it is necessary.
  • If it was possible to patch this to Eigen2, then I might be able to convert over.
A few 2nd order comments on this:
  • Since the standard library will have ranges soon enough to make the libraries more usable, I think that it may be worth designing ahead to ensure range compatibility; http://www..boost.org/doc/libs/1_41_0/libs/range/doc/range.html#bidirectional_range
  • Also I use std::transform all over the place... thought it would be great if there was an easy Eigen equivalent: eigen::transform(my_eigen_container, my_eigen_container_out, my_functor).  If this can use your reduction methods, that would be really awesome.

2) Separate Iterators vs. Cursors
With ublas, you don't really have iterators for matrices.  It is more like a cursor through the matrix.  If 


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