Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
boost库中是否有一些可以对键值对进行排序的函数?
例如,键是双变量数组,值是数组的某个索引(整数)。
您可能想要的是一个std::map<My_Double_Array, size_t>与您自己的My_Double_Array类一起包装double变量数组并提供operator <()排序的类。或者只是std::map<std::vector<double>, size_t>可能是你所需要的。
std::map<My_Double_Array, size_t>
My_Double_Array
double
operator <()
std::map<std::vector<double>, size_t>