Registered Member
|
Hi,
I'm teaching C++ and in my experience one very often gets out-of-bound indices when developping code. This was one of the reason for my own matrix library I have written some years, ago, (non-templated). So, is there an (optional, of course) checking of index bounds in Eigen2? Eigen2 looks very promising and fills an important gap since even the forthcoming new C++ standard (2009?) doesn't improve support for matrix calculcations. Many thanks for a hint, Helmut.
Last edited by ggael on Wed Feb 18, 2009 11:32 am, edited 1 time in total.
|
Moderator
|
Hi,
yes checking of index bounds is the default behavior in debug mode, i.e., when NDEBUG is not defined. Also note that such bound checking only occurs when using operator() and operator[]. The more explicit .coeff() and .coeffRef() member functions bypass this test (unless EIGEN_INTERNAL_DEBUGGING is defined). See: http://eigen.tuxfamily.org/dox/classEig ... 2015b21530 |
Registered Member
|
It may not directly improve support for matrix computations, but that's only because the design philosophy of c++ is to put in the language itself only the minimum to allow making libraries. I can tell you that C++09 is a real christmas wishlist for Eigen, and if we had had C++09 we could have made many parts of Eigen code simpler. Unfortunately, it'll be another 5 years at least before we can require C++09, wrt to our more conservative users.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell