I'm wondering a simple way to find the maximum/minimum element of a boost multiarray, an object of 3 indices as the following:
int iDepth=10,iWidth=10,iHeight=10;
boost::multi_array<GLfloat, 3> image(boost::extents[iDepth][iWidth][iHeight]);
This should work :
std::max_element( image.origin(), image.origin() + image.num_elements());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With