|
Boost Users : |
Subject: [Boost-users] [multi-array] Extracting dimension information from a multi-array
From: Ryan McConnehey (mccorywork_at_[hidden])
Date: 2010-09-12 02:37:14
typedef boost::multi_array<double, 3> array_type; typedef array_type::index index; array_type A(boost::extents[3][4][2]); // Assign values to the elements int values = 0; for(index i = 0; i != 3; ++i) for(index j = 0; j != 4; ++j) for(index k = 0; k != 2; ++k) A[i][j][k] = values++;
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