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
USA
 
***
 
From: Jason D Schmidt <jd.schmidt@juno.com> Save Address
To: boost@lists.boost.org
Date: Tue, 10 Sep 2002 20:18:34 -0600
Subject: [boost] Re:  2-dimensional container (grid)
Reply-To: boost@lists.boost.org

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
jd.schmidt@juno.com


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

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

I've been watching the list for a couple days, and i was wondering if
there
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,
but
all of the internal vectors have to be resized independently and they
would
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
it
were a 2-dimensional array:

grid<int> vGrid;
vGrid.resize(3,3);
vGrid[2][2] = 0;

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

void dosomething(grid<int> &rGrid);

dosomething(vGrid);

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


________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/web/.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost