barry: Your go-to motif accountant  0.0-1
Full enumeration of sample space and fast count of sufficient statistics for binary arrays
statscounter-meat.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STATSCOUNTER_TYPE()   StatsCounter<Array_Type,Data_Type>
 
#define STATSCOUNTER_TEMPLATE_ARGS()   <typename Array_Type, typename Data_Type>
 
#define STATSCOUNTER_TEMPLATE(a, b)    template STATSCOUNTER_TEMPLATE_ARGS() inline a STATSCOUNTER_TYPE()::b
 

Functions

 STATSCOUNTER_TEMPLATE (, StatsCounter)(const StatsCounter< Array_Type
 
EmptyArray clear ()
 
 STATSCOUNTER_TEMPLATE (,~StatsCounter)()
 
 STATSCOUNTER_TEMPLATE (void, reset_array)(const Array_Type *Array_)
 
 STATSCOUNTER_TEMPLATE (void, add_counter)(Counter< Array_Type
 
 STATSCOUNTER_TEMPLATE (void, set_counters)(Counters< Array_Type
 
 STATSCOUNTER_TEMPLATE (void, count_init)(size_t i
 
current_stats resize (counters->size(), 0.0)
 
 for (size_t n=0u;n< counters->size();++n) current_stats[n]
 
 STATSCOUNTER_TEMPLATE (void, count_current)(size_t i
 
 STATSCOUNTER_TEMPLATE (std::vector< std::string >, get_names)() const
 
 STATSCOUNTER_TEMPLATE (std::vector< std::string >, get_descriptions)() const
 

Variables

Data_Type & counter
 
 EmptyArray = *Array
 
 current_stats = counter.current_stats
 
 counters = new Counters<Array_Type,Data_Type>((*counter.counters))
 
 counter_deleted = false
 
Data_Type f_
 
 return
 
Data_Type * counters_
 
size_t j
 

Macro Definition Documentation

◆ STATSCOUNTER_TEMPLATE

#define STATSCOUNTER_TEMPLATE (   a,
 
)     template STATSCOUNTER_TEMPLATE_ARGS() inline a STATSCOUNTER_TYPE()::b

Definition at line 8 of file statscounter-meat.hpp.

◆ STATSCOUNTER_TEMPLATE_ARGS

template STATSCOUNTER_TEMPLATE_ARGS ( )    <typename Array_Type, typename Data_Type>

Definition at line 6 of file statscounter-meat.hpp.

◆ STATSCOUNTER_TYPE

template Data_Type * STATSCOUNTER_TYPE ( )    StatsCounter<Array_Type,Data_Type>

Definition at line 4 of file statscounter-meat.hpp.

Function Documentation

◆ clear()

EmptyArray clear ( )

◆ for()

for ( size_t  n = 0u;n< counters->size();++n)

◆ resize()

current_stats resize ( counters->  size(),
0.  0 
)

◆ STATSCOUNTER_TEMPLATE() [1/9]

STATSCOUNTER_TEMPLATE ( StatsCounter  ) const

◆ STATSCOUNTER_TEMPLATE() [2/9]

STATSCOUNTER_TEMPLATE ( StatsCounter)

Definition at line 27 of file statscounter-meat.hpp.

◆ STATSCOUNTER_TEMPLATE() [3/9]

STATSCOUNTER_TEMPLATE ( std::vector< std::string >  ,
get_descriptions   
) const

Definition at line 256 of file statscounter-meat.hpp.

◆ STATSCOUNTER_TEMPLATE() [4/9]

STATSCOUNTER_TEMPLATE ( std::vector< std::string >  ,
get_names   
) const

Definition at line 251 of file statscounter-meat.hpp.

◆ STATSCOUNTER_TEMPLATE() [5/9]

STATSCOUNTER_TEMPLATE ( void  ,
add_counter   
)

◆ STATSCOUNTER_TEMPLATE() [6/9]

STATSCOUNTER_TEMPLATE ( void  ,
count_current   
)

◆ STATSCOUNTER_TEMPLATE() [7/9]

STATSCOUNTER_TEMPLATE ( void  ,
count_init   
)

◆ STATSCOUNTER_TEMPLATE() [8/9]

STATSCOUNTER_TEMPLATE ( void  ,
reset_array   
) const

Definition at line 34 of file statscounter-meat.hpp.

◆ STATSCOUNTER_TEMPLATE() [9/9]

STATSCOUNTER_TEMPLATE ( void  ,
set_counters   
)

Variable Documentation

◆ counter

Data_Type& counter
Initial value:
{
Array = counter.Array
Data_Type & counter

Definition at line 12 of file statscounter-meat.hpp.

◆ counter_deleted

counter_deleted = false

Definition at line 23 of file statscounter-meat.hpp.

◆ counters

counters = new Counters<Array_Type,Data_Type>((*counter.counters))

Definition at line 22 of file statscounter-meat.hpp.

◆ counters_

Data_Type* counters_
Initial value:
{
delete counters
counter_deleted

Definition at line 53 of file statscounter-meat.hpp.

◆ current_stats

current_stats = counter.current_stats

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

◆ EmptyArray

EmptyArray = *Array

Definition at line 17 of file statscounter-meat.hpp.

◆ f_

Data_Type f_
Initial value:
{
counters->add_counter(f_)
Data_Type f_

Definition at line 44 of file statscounter-meat.hpp.

◆ j

size_t j
Initial value:
{
if (counters->size() == 0u)
throw std::logic_error("No counters added: Cannot count without knowning what to count!")

Definition at line 66 of file statscounter-meat.hpp.

◆ return

return

Definition at line 49 of file statscounter-meat.hpp.