#ifndef VECTOR_H_ #define VECTOR_H_ #include "old_vector.h" #include "hash.h" template using vector = old_vector; template using svector = old_svector; template using ptr_vector = old_ptr_vector; using int_vector = old_svector; using unsigned_vector = old_svector; using char_vector = old_svector; using signed_char_vector = old_svector; using double_vector = old_svector; inline std::ostream& operator<<(std::ostream& out, unsigned_vector const& v) { for (unsigned u : v) out << u << " "; return out; } template struct vector_hash_tpl { Hash m_hash; typedef Vec data; unsigned operator()(data const& v, unsigned idx) const { return m_hash(v[idx]); } vector_hash_tpl(Hash const& h = Hash()):m_hash(h) {} unsigned operator()(data const& v) const { if (v.empty()) { return 778; } return get_composite_hash, vector_hash_tpl>(v, v.size()); } }; template struct vector_hash : public vector_hash_tpl > {}; template struct svector_hash : public vector_hash_tpl > {}; #endif /* VECTOR_H_ */