barry: Your go-to motif accountant  0.0-1
Full enumeration of sample space and fast count of sufficient statistics for binary arrays
Rules< Array_Type, Data_Type > Class Template Reference

Vector of objects of class Rule. More...

#include <rules-bones.hpp>

Public Member Functions

 Rules ()
 
 Rules (const Rules< Array_Type, Data_Type > &rules_)
 
Rules< Array_Type, Data_Type > operator= (const Rules< Array_Type, Data_Type > &rules_)
 
 ~Rules ()
 
size_t size () const noexcept
 
bool operator() (const Array_Type &a, size_t i, size_t j)
 Check whether a given cell is free or locked. More...
 
void get_seq (const Array_Type &a, std::vector< size_t > *free, std::vector< size_t > *locked=nullptr)
 Computes the sequence of free and locked cells in an BArray. More...
 
std::vector< std::string > get_names () const
 
std::vector< std::string > get_descriptions () const
 
std::vector< Rule< Array_Type, Data_Type > >::iterator begin ()
 
std::vector< Rule< Array_Type, Data_Type > >::iterator end ()
 
Rule adding
Parameters
rule
void add_rule (Rule< Array_Type, Data_Type > rule)
 
void add_rule (Rule_fun_type< Array_Type, Data_Type > rule_, Data_Type data_, std::string name_="", std::string description_="")
 

Detailed Description

template<typename Array_Type, typename Data_Type>
class Rules< Array_Type, Data_Type >

Vector of objects of class Rule.

Template Parameters
Array_TypeAn object of class BArray
Data_TypeAny type.

Definition at line 71 of file rules-bones.hpp.

Constructor & Destructor Documentation

◆ Rules() [1/2]

template<typename Array_Type , typename Data_Type >
Rules< Array_Type, Data_Type >::Rules ( )
inline

Definition at line 77 of file rules-bones.hpp.

◆ Rules() [2/2]

template<typename Array_Type , typename Data_Type >
Rules< Array_Type, Data_Type >::Rules ( const Rules< Array_Type, Data_Type > &  rules_)
inline

Definition at line 5 of file rules-meat.hpp.

◆ ~Rules()

template<typename Array_Type , typename Data_Type >
Rules< Array_Type, Data_Type >::~Rules ( )
inline

Definition at line 82 of file rules-bones.hpp.

Member Function Documentation

◆ add_rule() [1/2]

template<typename Array_Type , typename Data_Type >
void Rules< Array_Type, Data_Type >::add_rule ( Rule< Array_Type, Data_Type >  rule)
inline

Definition at line 72 of file rules-meat.hpp.

◆ add_rule() [2/2]

template<typename Array_Type , typename Data_Type >
void Rules< Array_Type, Data_Type >::add_rule ( Rule_fun_type< Array_Type, Data_Type >  rule_,
Data_Type  data_,
std::string  name_ = "",
std::string  description_ = "" 
)
inline

Definition at line 82 of file rules-meat.hpp.

◆ begin()

template<typename Array_Type , typename Data_Type >
std::vector< Rule<Array_Type,Data_Type> >::iterator Rules< Array_Type, Data_Type >::begin ( )
inline

Definition at line 134 of file rules-bones.hpp.

◆ end()

template<typename Array_Type , typename Data_Type >
std::vector< Rule<Array_Type,Data_Type> >::iterator Rules< Array_Type, Data_Type >::end ( )
inline

Definition at line 137 of file rules-bones.hpp.

◆ get_descriptions()

template<typename Array_Type , typename Data_Type >
std::vector< std::string > Rules< Array_Type, Data_Type >::get_descriptions
inline

Definition at line 180 of file rules-meat.hpp.

◆ get_names()

template<typename Array_Type , typename Data_Type >
std::vector< std::string > Rules< Array_Type, Data_Type >::get_names
inline

Definition at line 167 of file rules-meat.hpp.

◆ get_seq()

template<typename Array_Type , typename Data_Type >
void Rules< Array_Type, Data_Type >::get_seq ( const Array_Type &  a,
std::vector< size_t > *  free,
std::vector< size_t > *  locked = nullptr 
)
inline

Computes the sequence of free and locked cells in an BArray.

Parameters
aAn object of class BArray.
freePointer to a vector of pairs (i, j) listing the free cells.
locked(optional) Pointer to a vector of pairs (i, j) listing the locked cells.
Returns
Nothing.

Definition at line 117 of file rules-meat.hpp.

◆ operator()()

template<typename Array_Type , typename Data_Type >
bool Rules< Array_Type, Data_Type >::operator() ( const Array_Type &  a,
size_t  i,
size_t  j 
)
inline

Check whether a given cell is free or locked.

Parameters
aA BArray object
irow position
jcol position
Returns
true If the cell is locked
false If the cell is free

Definition at line 101 of file rules-meat.hpp.

◆ operator=()

template<typename Array_Type , typename Data_Type >
Rules< Array_Type, Data_Type > Rules< Array_Type, Data_Type >::operator= ( const Rules< Array_Type, Data_Type > &  rules_)

Definition at line 19 of file rules-meat.hpp.

◆ size()

template<typename Array_Type , typename Data_Type >
size_t Rules< Array_Type, Data_Type >::size ( ) const
inlinenoexcept

Definition at line 84 of file rules-bones.hpp.


The documentation for this class was generated from the following files: