remove hash_map/hash_set; replace with std::unordered_map|set
This commit is contained in:
@@ -689,9 +689,9 @@ class ModelStatisticsVisitor : public ModelVisitor {
|
||||
extension_types_[extension_type]++;
|
||||
}
|
||||
|
||||
hash_map<std::string, int> constraint_types_;
|
||||
hash_map<std::string, int> expression_types_;
|
||||
hash_map<std::string, int> extension_types_;
|
||||
std::unordered_map<std::string, int> constraint_types_;
|
||||
std::unordered_map<std::string, int> expression_types_;
|
||||
std::unordered_map<std::string, int> extension_types_;
|
||||
int num_constraints_;
|
||||
int num_variables_;
|
||||
int num_expressions_;
|
||||
@@ -699,14 +699,14 @@ class ModelStatisticsVisitor : public ModelVisitor {
|
||||
int num_intervals_;
|
||||
int num_sequences_;
|
||||
int num_extensions_;
|
||||
hash_set<const BaseObject*> already_visited_;
|
||||
std::unordered_set<const BaseObject*> already_visited_;
|
||||
};
|
||||
|
||||
// ---------- Variable Degree Visitor ---------
|
||||
|
||||
class VariableDegreeVisitor : public ModelVisitor {
|
||||
public:
|
||||
explicit VariableDegreeVisitor(hash_map<const IntVar*, int>* const map)
|
||||
explicit VariableDegreeVisitor(std::unordered_map<const IntVar*, int>* const map)
|
||||
: map_(map) {}
|
||||
|
||||
~VariableDegreeVisitor() override {}
|
||||
@@ -797,7 +797,7 @@ class VariableDegreeVisitor : public ModelVisitor {
|
||||
object->Accept(this);
|
||||
}
|
||||
|
||||
hash_map<const IntVar*, int>* const map_;
|
||||
std::unordered_map<const IntVar*, int>* const map_;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
@@ -810,7 +810,7 @@ ModelVisitor* Solver::MakeStatisticsModelVisitor() {
|
||||
}
|
||||
|
||||
ModelVisitor* Solver::MakeVariableDegreeVisitor(
|
||||
hash_map<const IntVar*, int>* const map) {
|
||||
std::unordered_map<const IntVar*, int>* const map) {
|
||||
return RevAlloc(new VariableDegreeVisitor(map));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user