hash算法
typedef pair<int,int> RolePair;
typedef pair<RolePair,double> DisPair;
//function object
class DisSortCriterion
{
public:
bool operator()(const DisPair& left, const DisPair& right)const
{
if( left.second > right.second )
return true;
return false;
}
};
typedef multiset<DisPair,DisSortCriterion> Mapping;
typedef set<int> AgentSet;
typedef map<AgentSet,Mapping> HashMap;
以上是我定义的map容器,但是我想把map容器转换成unordered_map,我想用合适的hash算法实现它,大神们,给点意见啊···新手不会呀···