阅读背景:

Step / Stride Iterator与std :: minmax_element一起使用

来源:互联网 

I have a 1D float array which represents a m *n (rows and columns) table of float values. My requirement is to find a min/max element for each row and column. For rows I can easily do it by using std::minmax_element by specifying a range of n elements. But for columns I need to use a stride iterator as elements are placed are not contiguous but placed at a step interval of n. Is there a standard iterator in boost/STL that can be used. The other option is to write my own version of it. What is the best course ?I have a 1D float array which represents a m *n




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: