votca/tools

Edge Class hash update

Closed this issue · 4 comments

Update edge hash implementation as it does not conform to the standard as is.

The standard mandates that you provide a hash in the following way:

class Customer {
   ...
};

class CustomerHash {
   public:
       std::size_t operator() (const Customer& c) const {
          return ...
       }
};

As opposed to the method I used which is hacky and places the hash in the std namespace.

To use the has with the an stl container simply pass the hash in:

std::unordered_set<Customer,CustomerHash> custset;

Upon further reading this does not appear to be the issue. The way it was implemented was fine.