Debian Codegraph @

libbrial/include/polybori/routines/pbori_routines_hash.h

raw symbols SCIP
1 // -*- c++ -*-cxx . . $ `<file>/libbrial/include/polybori/routines/pbori_routines_hash.h`/
2 //*****************************************************************************
3 /** @file pbori_routines_hash.h
4 *
5 * @author Alexander Dreyer
6 * @date 2006-08-23
7 *
8 * This file includes files, which defines miscellaneous function templates.
9 *
10 * @par Copyright:
11 * (c) 2006 by The PolyBoRi Team
12 **/
13 //*****************************************************************************
14
15 #ifndef polybori_routines_pbori_routines_hash_h_
16 #define polybori_routines_pbori_routines_hash_h_cxx . . $ `libbrial/include/polybori/routines/pbori_routines_hash.h:16:9`!
17 // include basic definitions
18 #include <polybori/pbori_defs.h>cxx . . $ `<file>/libbrial/include/polybori/pbori_defs.h`/
19 #include <boost/functional/hash.hpp>
20
21
22 BEGIN_NAMESPACE_PBORIcxx . . $ `libbrial/include/polybori/pbori_defs.h:74:11`!
23
24
25
26 template <class HashType, class NaviType>
27 void
28 stable_hash_rangecxx . . $ polybori/stable_hash_range(33274b2173bbdc28).(HashType& seed, NaviType navi) {
29
30 if (navi.isConstant()) {
31 if (navi.terminalValue())
32 boostcxx . . $ boost/::hash_combinecxx . . $ boost/hash_combine(774f86a0fdd9657e).(seed, CTypescxx . . $ polybori/CTypes#::max_indexcxx . . $ polybori/CTypes#max_index(b126dc7c1de90089).());
33 return;
34 }
35
36 boostcxx . . $ boost/::hash_combinecxx . . $ boost/hash_combine(774f86a0fdd9657e).(seed, *navi);
37
38 stable_hash_rangecxx . . $ polybori/stable_hash_range(33274b2173bbdc28).(seed, navi.thenBranch());
39 stable_hash_rangecxx . . $ polybori/stable_hash_range(33274b2173bbdc28).(seed, navi.elseBranch());
40 }
41
42 template <class NaviType>
43 stdcxx . . $ std/::size_tcxx . . $ std/size_t#
44 stable_hash_rangecxx . . $ polybori/stable_hash_range(11815c24b85c60f1).(NaviType navi) {
45
46 stdcxx . . $ std/::size_tcxx . . $ std/size_t# seed = 0;
47 stable_hash_rangecxx . . $ polybori/stable_hash_range(11815c24b85c60f1).(seed, navi);
48
49 return seed;
50 }
51
52 template <class HashType>
53 void
54 finalize_term_hashcxx . . $ polybori/finalize_term_hash(8e935d9c2e576e3a).(HashType& seed) {
55 boostcxx . . $ boost/::hash_combinecxx . . $ boost/hash_combine(774f86a0fdd9657e).(seed, CTypescxx . . $ polybori/CTypes#::max_indexcxx . . $ polybori/CTypes#max_index(b126dc7c1de90089).());
56 }
57
58 template <class HashType, class NaviType>
59 void
60 stable_first_hash_rangecxx . . $ polybori/stable_first_hash_range(33274b2173bbdc28).(HashType& seed, NaviType navi) {
61
62 while (!navi.isConstant()) {
63 boostcxx . . $ boost/::hash_combinecxx . . $ boost/hash_combine(774f86a0fdd9657e).(seed, *navi);
64 navi.incrementThen();
65 }
66 if (navi.terminalValue())
67 finalize_term_hashcxx . . $ polybori/finalize_term_hash(8e935d9c2e576e3a).(seed);
68
69 }
70
71 template <class NaviType>
72 stdcxx . . $ std/::size_tcxx . . $ std/size_t#
73 stable_first_hash_rangecxx . . $ polybori/stable_first_hash_range(11815c24b85c60f1).(NaviType navi) {
74
75 stdcxx . . $ std/::size_tcxx . . $ std/size_t# seed = 0;
76 stable_first_hash_rangecxx . . $ polybori/stable_first_hash_range(11815c24b85c60f1).(seed, navi);
77
78 return seed;
79 }
80
81 template <class HashType, class Iterator>
82 void
83 stable_term_hashcxx . . $ polybori/stable_term_hash(b3fe0328b6ef2113).(HashType& seed, Iterator start, Iterator finish) {
84 boostcxx . . $ boost/::hash_rangecxx . . $ boost/hash_range(e035603189eae02d).(seed, start, finish);
85 finalize_term_hashcxx . . $ polybori/finalize_term_hash(8e935d9c2e576e3a).(seed);
86 }
87
88 template <class Iterator>
89 stdcxx . . $ std/::size_tcxx . . $ std/size_t#
90 stable_term_hashcxx . . $ polybori/stable_term_hash(bcb42e5b36424860).(Iterator start, Iterator finish) {
91
92 stdcxx . . $ std/::size_tcxx . . $ std/size_t# seed(0);
93 stable_term_hashcxx . . $ polybori/stable_term_hash(bcb42e5b36424860).(seed, start, finish);
94
95 return seed;
96 }
97
98 END_NAMESPACE_PBORIcxx . . $ `libbrial/include/polybori/pbori_defs.h:77:11`!
99
100 #endif