Boost logo

Boost :

From: Matt Verona (mattverona_at_[hidden])
Date: 2002-09-12 09:16:38

      I'm also very interested in these "grid container classes".

      I developed the Array2d and Array3d classes for The U.S. Army's National Missile Defense (simulation) project, based on Scott Meyer's approach (see Proxy pattern for multidimensional arrays, pp. 213-217, "More Effective C++").

      The Array2d<T> class uses the STL vector<T> as the proxy object, and Array3d<T> uses Array2d<T> as the proxy object, etc.

      I currently need two and three dimensional array (grid) classes, to store and allow interpolation on (monotonically ordered/sorted) 2 and 3 dimensional data, respectively.

      I may need a four dimensional array class, but this design seems to scale well to higher dimensions (i.e., use Array3d<T> as the proxy object).

      The interpolation functions can be implemented as generic algorithms, so the analogy to one dimensional STL containers and algorithms is complete...

      I currently have all (multidimensional) interpolation algorithms from the book "Numerical Recipes in C" implemented as generic algorithms, which work well with Array2d and Array3d.

      Does the Boost library have interpolation functions that generically operate on the multi-array class?

      ~Matt Verona
      Sugarland Software, Inc.
      Houston Texas


      From: Jason D Schmidt <jd.schmidt_at_[hidden]> Save Address
      To: boost_at_[hidden]
      Date: Tue, 10 Sep 2002 20:18:34 -0600
      Subject: [boost] Re: 2-dimensional container (grid)
      Reply-To: boost_at_[hidden]

      I do a lot of computational physics, and I think a grid-type class might
      be really useful. I work with a lot guys who use Matlab, but I'd like to
      see similar numerical support (particularly 2+ dimensional arrays) in C++
      because its language, library, and performance is far superior to Matlab.
      What advantages does the grid class have over Boost's multi-array?

      Also, as an open question for any authority on Boost's multi-array, what
      does the multi-array provide in the way of numerical support (maybe as
      opposed to uBLAS)? How well does it integrate with STL (much better than
      std::valarray<T>, I hope)?

      Jason Schmidt

      --Original Message------------------------------------

      Date: Thu, 5 Sep 2002 18:38:09 -0700
      From: "Garrett Jones" <alkaline_at_[hidden]>
      To: <boost_at_[hidden]>
      Subject: [boost] query: interest in 2-dimensional container (grid)

      I've been watching the list for a couple days, and i was wondering if
      was interest in a 2-dimensional container template class, which would be
      called "grid". It is possible to make a 2-dimensional grid with vectors,
      all of the internal vectors have to be resized independently and they
      all be in different locations of memory. The grid template would have a
      single area in memory for the contents, and data could be accessed as if
      were a 2-dimensional array:

      grid<int> vGrid;
      vGrid[2][2] = 0;

      This is done by using a surrogate class, gridrow. Passing it to functions
      also easy:

      void dosomething(grid<int> &rGrid);


      I already have the basics working and have used it successfully in a
      (one-user) programs. So, if there is interest, what do i do to prepare it
      for submission? Also, are there already template classes available
      with this type of functionality?
      Garrett Jones

      Juno offers FREE or PREMIUM Internet access for less!
      Join Juno today! For your FREE software, visit:
      Unsubscribe & other changes:


Boost list run by bdawes at, gregod at, cpdaniel at, john at