1 #ifndef BARRY_SUPPORT_BONES_HPP
2 #define BARRY_SUPPORT_BONES_HPP 1
4 template <
typename Cell_Type,
typename Data_Type>
7 template <
typename Tdat>
10 template <
typename Array_Type,
typename Data_Counter_Type>
13 template <
typename Array_Type,
typename Data_Rule_Type>
16 template<
typename Array_Type,
typename Data_Type>
38 typename Data_Counter_Type = bool,
39 typename Data_Rule_Type = bool,
40 typename Data_Rule_Dyn_Type =
bool
45 void calc_backend_sparse(
47 std::vector< Array_Type > * array_bank =
nullptr,
48 std::vector< double > * stats_bank =
nullptr
51 void calc_backend_dense(
53 std::vector< Array_Type > * array_bank =
nullptr,
54 std::vector< double > * stats_bank =
nullptr
60 Array_Type EmptyArray;
66 size_t iter_counter = 0u;
92 rules(new
Rules<Array_Type,Data_Rule_Type>()),
93 rules_dyn(new
Rules<Array_Type,Data_Rule_Dyn_Type>()),
101 rules(new
Rules<Array_Type,Data_Rule_Type>()),
102 rules_dyn(new
Rules<Array_Type,Data_Rule_Dyn_Type>()),
108 rules(new
Rules<Array_Type,Data_Rule_Type>()),
109 rules_dyn(new
Rules<Array_Type,Data_Rule_Dyn_Type>()),
124 std::vector< Array_Type > * array_bank =
nullptr,
125 std::vector< double > * stats_bank =
nullptr
163 bool eval_rules_dyn(
const std::vector<double> & counts,
const size_t &
i,
const size_t &
j);
181 std::vector< Array_Type > * array_bank =
nullptr,
182 std::vector< double > * stats_bank =
nullptr,
183 size_t max_num_elements_ = 0u
186 const std::vector< double > &
get_counts()
const;
#define BARRY_MAX_NUM_ELEMENTS
Baseline class for binary arrays.
A counter function based on change statistics.
Frequency table of vectors.
Rule for determining if a cell should be included in a sequence.
Vector of objects of class Rule.
Compute the support of sufficient statistics.
bool eval_rules_dyn(const std::vector< double > &counts, const size_t &i, const size_t &j)
void calc(std::vector< Array_Type > *array_bank=nullptr, std::vector< double > *stats_bank=nullptr, size_t max_num_elements_=0u)
Computes the entire support.
std::vector< double > current_stats
Rules< Array_Type, Data_Rule_Type > * get_rules()
Vector of static rules (cells to iterate).
Support(const Array_Type &Array_)
Constructor passing a reference Array.
Support(size_t N_, size_t M_)
Constructor specifying the dimensions of the array (empty).
size_t coordiantes_n_free
size_t coordiantes_n_locked
void init_support(std::vector< Array_Type > *array_bank=nullptr, std::vector< double > *stats_bank=nullptr)
Rules< Array_Type, Data_Rule_Dyn_Type > * get_rules_dyn()
Vector of dynamic rules (to include/exclude a realizaton).
std::vector< size_t > coordinates_free
void add_rule(Rule< Array_Type, Data_Rule_Type > *f_)
std::vector< bool > hashes_initialized
void add_rule_dyn(Rule< Array_Type, Data_Rule_Dyn_Type > *f_)
std::vector< double > change_stats
void set_rules_dyn(Rules< Array_Type, Data_Rule_Dyn_Type > *rules_)
Counters< Array_Type, Data_Counter_Type > * get_counters()
Vector of couter functions.
const std::vector< double > & get_counts() const
void add_counter(Counter< Array_Type, Data_Counter_Type > f_)
const FreqTable< double > & get_data() const
std::vector< size_t > coordinates_locked
std::vector< size_t > hashes
void set_rules(Rules< Array_Type, Data_Rule_Type > *rules_)
void set_counters(Counters< Array_Type, Data_Counter_Type > *counters_)
std::vector< double > * get_current_stats()
List current statistics.