3 #include <boost/iterator/permutation_iterator.hpp>
14 std::vector<id_type>
const& ids_;
15 TypeCompare(std::vector<id_type>
const& iType): ids_(iType) {}
16 bool operator()(id_type
const& iLHS, id_type
const& iRHS)
const {
17 return ids_[iLHS] < ids_[iRHS];
24 std::vector<int> indices(
size(),1);
26 std::partial_sum(indices.begin(),indices.end(),indices.begin());
27 std::sort(indices.begin(), indices.end(), TypeCompare(
m_ids));
31 boost::make_permutation_iterator(
m_ids.begin(), indices.begin() ),
32 boost::make_permutation_iterator(
m_ids.end(), indices.end() ),
std::vector< data_type > DataContainer
std::vector< std::vector< double > > tmp
std::vector< id_type > IdContainer