我想知道一种简单的方法来查找 boost 多数组的最大/最小元素,该对象是3个索引的对象,如下所示:

int iDepth=10,iWidth=10,iHeight=10;
boost::multi_array<GLfloat, 3> image(boost::extents[iDepth][iWidth][iHeight]);

最佳答案

这应该工作:

std::max_element( image.origin(), image.origin() + image.num_elements());

关于c++ - 如何从 boost 多阵列获得最大/最小元素,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17207777/

10-11 22:42
查看更多