sorting a ublas matrix
#include
AMDG Ed wrote:
#include
#include using namespace boost::numeric::ublas; matrix<MyObject> m_MyObjects(nRows, nCols);
I have a ublas matrix of objects as declared above... Is there a way within the Boost lib (i.e. something I don't have to write much custom code to use) that I can use to sort the matrix by a value of one of the data members of MyObject? For example
std::sort(m_MyObjects.data().begin(), m_MyObjects.data().end(), /appropriate predicate/); In Christ, Steven Watanabe
participants (2)
-
Ed
-
Steven Watanabe