Put the code inside a horus namespace

This commit is contained in:
Tiago Gomes
2013-02-07 23:53:13 +00:00
parent 4267465f53
commit 6f83ceb6f5
52 changed files with 270 additions and 53 deletions

View File

@@ -10,6 +10,8 @@
#include "Util.h"
namespace horus {
class Symbol
{
public:
@@ -67,25 +69,28 @@ LogVar::valid (void) const
return id_ != Util::maxUnsigned();
}
} // namespace horus
namespace std {
template <> struct hash<Symbol> {
size_t operator() (const Symbol& s) const {
template <> struct hash<horus::Symbol> {
size_t operator() (const horus::Symbol& s) const {
return std::hash<unsigned>() (s);
}
};
template <> struct hash<LogVar> {
size_t operator() (const LogVar& X) const {
template <> struct hash<horus::LogVar> {
size_t operator() (const horus::LogVar& X) const {
return std::hash<unsigned>() (X);
}
};
};
} // namespace std
namespace horus {
typedef std::vector<Symbol> Symbols;
typedef std::vector<Symbol> Tuple;
typedef std::vector<Tuple> Tuples;
@@ -205,5 +210,7 @@ Substitution::nrReplacements (void) const
return subs_.size();
}
} // namespace horus
#endif // YAP_PACKAGES_CLPBN_HORUS_LIFTEDUTILS_H_