how to get std::min_element() working with boost::multi_array?

Hello,
Could someone help getting std::min_element() (or a variation of) to
work with multi_array?
boost::multi_array

On 09/01/2010 02:20 PM, Valmor de Almeida wrote:
Hello,
Could someone help getting std::min_element() (or a variation of) to work with multi_array?
boost::multi_array
A; // code for dimensioning A and filling in; deleted cout << *min_element(A.begin(),A.end()) << endl; Thanks,
-- Valmor
For the record, this website is helpful http://salilab.org/imp/1.0/doc/html/classIMP_1_1algebra_1_1MultiArray.html In short, std::min_element() is not going to work with boost::multi_array. One has to write a wrapper function around the boost::multi_array::data() function as is done in the above-mentioned web site. Check the source: http://salilab.org/imp/1.0/doc/html/MultiArray_8h-source.html -- Valmor
participants (1)
-
Valmor de Almeida