QuoteOriginally posted by: outrunQuoteOriginally posted by: PolterBTW -- I think that as far as the names of iterators (not indices) functions are concerned, it's better to stick to "begin/end" convention (incl. free functions) and rely on the idiomatic asymmetric [begin, end) convention, too.yes, it's not 'better' but essential!Btw how would you decompose a problem (into e.g free functions) of filling a matrix in two ways: either rows first of columns first? Would you use a hierarchical concept, a matrix is a set of rows/columns? Sometimes I think that is all wrong: it should be a 2d iterator that can move in the 2d plane (up,down,left,right,diagonal, cr/lf, top-left, end-of-row) and for which ++, --, begin, end have no meaning because those are 1d dimensional concepts. Using this 2d iterator concept would make matrix algorithms much less cluttered with temporal object like 'row' 'column' and make it more homogenous. I'm not sure how to proceed in general. I think we are missing solid design principles -or at least the ambition to define them-: what are the concepts, algorithms and interfaces? Getting that right for just matrices is an overkill for this QFCL projects (let alone for MC, numerical solvers, back-end integration), and hence the project itself will by definition lack a solid foundation that gives it essential properties like genericacity, orthogonality etc. Without that we work for the next 5 years to come up with something as complicates and not-to-be-so-proud-of as QuantLib. That's not an inspiring outlook.You're right, we're pioneering here in a sense (even Stepanov mentioned two-dimensional iterators as going beyond the current STL -- and we're still before 2016 when he plans to teach a course on Generic Numerical Methods! ;-)Perhaps we could consider some ideas from here, like grids, grid functions and cell iterators:The Grid Algorithms Library (GrAL)
http://www.math.tu-cottbus.de/~berti/gr ... nts?outrun -- any thoughts on the genericity of this approach?
http://www.math.tu-cottbus.de/~berti/gr ... mlOOglesby also mentioned image iterators, I wonder how can we tie this together.Cuch -- the GrAL is "marketed" in the context of solving PDEs via FEM and FVM, but it seems to me there are common concepts that also apply to FDM -- what do you think?
http://www.math.tu-cottbus.de/~berti/gr ... op_25.html