Boost logo

Boost Users :

From: Baranowski, Daniel (dbaranowski_at_[hidden])
Date: 2006-06-30 10:15:15


[snip]
> [snip]
> > Basically, I have a 2 Dimensional array and I
> > would like to be able to access the center of that array
> > using a variable that maps to some index (for example,
> > element[3][3] in a 7x7 array).
> [snip]
>
> Would T & center = element[3][3] be satisfactory?
>
> I don't think multiarray supports any type of reallocation after
> construction, so it should be ok.
>
> Sohail

Thanks Sohail. While you can resize a multi_array, I won't be, so it's
not an issue. What you've got is pretty obvious, I guess I was just had
gone too far down the "view" path to see the simple answer!

Thanks also to Cromwell for chiming in too as that is definitely a good,
more generic approach, but probably overkill for my particular instance.
But, still good to know!

Daniel
**********************************************************************************************
Disclaimer - This email and any files transmitted with it are proprietary and may contain privileged or copyright information. You must not present this message to another party without
gaining permission from the sender. If you are not the intended recipient you must not copy, distribute or use this email or the information contained in it for any purpose other than to notify
us. If you have received this message in error, please notify the sender immediately, and delete this email from your system. We do not guarantee that this material is free from viruses or any
other defects although due care has been taken to minimize the risk. eSafe scanned this email for viruses, vandals and malicious contentAny views expressed in this message are those of
the individual sender, except where the sender specifically states them to be the views of LSI.
**********************************************************************************************


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net