barry: Your go-to motif accountant  0.0-1
Full enumeration of sample space and fast count of sufficient statistics for binary arrays
barry.hpp
Go to the documentation of this file.
1 #include <iostream>
2 #include <cstdarg>
3 #include <vector>
4 #include <unordered_map>
5 #include <functional>
6 #include <stdexcept>
7 #include <cmath>
8 #include <map>
9 #include <algorithm>
10 #include <utility>
11 #include <random>
12 #include <climits>
13 #include <cfloat>
14 #include <string>
15 #include <cstdint>
16 #include <memory>
17 #include <regex>
18 #include <iterator>
19 
20 #if defined(__OPENMP) || defined(_OPENMP)
21 #include <omp.h>
22 
23 // Set the number of threads to match the number of cores
24 // in the machine
25 
26 #endif
27 
28 #ifndef BARRY_HPP
29 #define BARRY_HPP
30 
31 #define BARRY_VERSION_MAYOR 0
32 #define BARRY_VERSION_MINOR 1
33 #define BARRY_VERSION BARRY_VERSION_MAYOR ## . ## BARRY_VERSION_MINOR
34 
38 namespace barry {
39 
41  #include "typedefs.hpp"
42  #include "barry-macros.hpp"
43  #include "freqtable.hpp"
44 
45  #include "cell-bones.hpp"
46  #include "cell-meat.hpp"
47 
48  #include "barray-bones.hpp"
49  #include "barraycell-bones.hpp"
50  #include "barray-meat.hpp"
51  #include "barraycell-meat.hpp"
52  #include "barray-meat-operators.hpp"
53 
54  #include "barraydense-bones.hpp"
55  #include "barraydensecell-bones.hpp"
56 
57  #include "barraydenserow-bones.hpp"
58  #include "barraydensecol-bones.hpp"
59 
60  #include "barraydense-meat.hpp"
61  #include "barraydensecell-meat.hpp"
63 
64  #include "counters-bones.hpp"
65  #include "counters-meat.hpp"
66 
67  #include "statscounter-bones.hpp"
68  #include "statscounter-meat.hpp"
69 
70  #include "support-bones.hpp"
71  #include "support-meat.hpp"
72 
73  #include "powerset-bones.hpp"
74  #include "powerset-meat.hpp"
75 
76  #include "model-bones.hpp"
77  #include "model-meat.hpp"
78 
79  #include "rules-bones.hpp"
80  #include "rules-meat.hpp"
81 
82  namespace counters {
83  namespace network {
84  #include "counters/network.hpp"
85  }
86  }
87 
88 }
89 
91 
92 #define COUNTER_FUNCTION(a) template <typename Array_Type = barry::BArray<>, typename Data_Type = bool> \
93  inline double (a) (const Array_Type & Array, size_t i, size_t j, Data_Type & data)\
94 
95 #define COUNTER_LAMBDA(a) template <typename Array_Type = barry::BArray<>, typename Data_Type = bool> \
96  Counter_fun_type<Array_Type, Data_Type> a = \
97  [](const Array_Type & Array, size_t i, size_t j, Data_Type & data)
98 
99 #define RULE_FUNCTION(a) template <typename Array_Type = barry::BArray<>, typename Data_Type = bool> \
100  inline bool (a) (const Array_Type & Array, size_t i, size_t j, Data_Type & data)\
101 
102 #define RULE_LAMBDA(a) template <typename Array_Type = barry::BArray<>, typename Data_Type = bool> \
103  Rule_fun_type<Array_Type, Data_Type> a = \
104  [](const Array_Type & Array, size_t i, size_t j, Data_Type & data)
105 
106 #endif
barry: Your go-to motif accountant
Definition: barry.hpp:38