Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalashnikovni committed Nov 13, 2023
1 parent dd244c6 commit d38f560
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sbg/pw_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,13 @@ PWMap<Set> normalize(PWMap<Set> pw)
return res;
}

template<typename Set>
std::size_t hash_value(const PWMap<Set> &pw)
{
std::size_t seed = 0;
return boost::hash_range(pw.begin(), pw.end());
}

// Template instantiations -----------------------------------------------------

template std::ostream &operator<<(std::ostream &out, const MapSet<UnordSet> &ms);
Expand Down
3 changes: 3 additions & 0 deletions sbg/pw_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ unsigned int nmbrDims(PWMap<Set> pw);
template<typename Set>
PWMap<Set> normalize(PWMap<Set> pw);

template<typename Set>
std::size_t hash_value(const PWMap<Set> &pw);

typedef PWMap<UnordSet> BasePWMap;
typedef PWMap<OrdSet> CanonPWMap;

Expand Down

0 comments on commit d38f560

Please sign in to comment.