codac 1.5.6
Loading...
Searching...
No Matches
codac_Hashcode.h
Go to the documentation of this file.
1
12#ifndef __CODAC_HASHCODE_H__
13#define __CODAC_HASHCODE_H__
14
15#include <cstdint>
16#include <cstdlib>
17#include <functional>
18
19namespace codac
20{
21 class Domain;
22 class Contractor;
23
24 class ContractorHashcode
25 {
26 public:
27
28 ContractorHashcode(const Contractor& ctc);
29 bool operator<(const ContractorHashcode& a) const;
30
31 protected:
32
33 size_t m_n;
34 std::uintptr_t *m_ptr;
35 };
36
37 class DomainHashcode
38 {
39 public:
40
41 DomainHashcode(const Domain& dom);
42 bool operator<(const DomainHashcode& a) const;
43
44 static std::uintptr_t uintptr(const Domain& dom);
45
46 protected:
47
48 std::uintptr_t m_ptr;
49 };
50}
51
52namespace std
53{
54 template <>
55 struct hash<codac::Domain>
56 {
57 std::uintptr_t operator()(const codac::Domain& dom) const
58 {
59 return codac::DomainHashcode::uintptr(dom);
60 }
61 };
62}
63
64
65#endif
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition codac_capd_helpers.h:9