barry: Your go-to motif accountant
0.0-1
Full enumeration of sample space and fast count of sufficient statistics for binary arrays
|
Counters for network models. More...
Functions | |
template<typename Tnet = Network> | |
void | counter_edges (NetCounters< Tnet > *counters) |
Number of edges. More... | |
template<typename Tnet = Network> | |
void | counter_isolates (NetCounters< Tnet > *counters) |
Number of isolated vertices. More... | |
template<> | |
void | counter_isolates (NetCounters< NetworkDense > *counters) |
template<typename Tnet = Network> | |
void | counter_mutual (NetCounters< Tnet > *counters) |
Number of mutual ties. More... | |
template<typename Tnet = Network> | |
void | counter_istar2 (NetCounters< Tnet > *counters) |
template<> | |
void | counter_istar2 (NetCounters< NetworkDense > *counters) |
template<typename Tnet = Network> | |
void | counter_ostar2 (NetCounters< Tnet > *counters) |
template<> | |
void | counter_ostar2 (NetCounters< NetworkDense > *counters) |
template<typename Tnet = Network> | |
void | counter_ttriads (NetCounters< Tnet > *counters) |
template<> | |
void | counter_ttriads (NetCounters< NetworkDense > *counters) |
template<typename Tnet = Network> | |
void | counter_ctriads (NetCounters< Tnet > *counters) |
template<> | |
void | counter_ctriads (NetCounters< NetworkDense > *counters) |
template<typename Tnet = Network> | |
void | counter_density (NetCounters< Tnet > *counters) |
template<typename Tnet = Network> | |
void | counter_idegree15 (NetCounters< Tnet > *counters) |
template<> | |
void | counter_idegree15 (NetCounters< NetworkDense > *counters) |
template<typename Tnet = Network> | |
void | counter_odegree15 (NetCounters< Tnet > *counters) |
template<> | |
void | counter_odegree15 (NetCounters< NetworkDense > *counters) |
template<typename Tnet = Network> | |
void | counter_absdiff (NetCounters< Tnet > *counters, size_t attr_id, double alpha=1.0) |
Sum of absolute attribute difference between ego and alter. More... | |
template<typename Tnet = Network> | |
void | counter_diff (NetCounters< Tnet > *counters, size_t attr_id, double alpha=1.0, double tail_head=true) |
Sum of attribute difference between ego and alter to pow(alpha) More... | |
NETWORK_COUNTER (init_single_attr) | |
template<typename Tnet = Network> | |
void | counter_nodeicov (NetCounters< Tnet > *counters, size_t attr_id) |
template<typename Tnet = Network> | |
void | counter_nodeocov (NetCounters< Tnet > *counters, size_t attr_id) |
template<typename Tnet = Network> | |
void | counter_nodecov (NetCounters< Tnet > *counters, size_t attr_id) |
template<typename Tnet = Network> | |
void | counter_nodematch (NetCounters< Tnet > *counters, size_t attr_id) |
template<typename Tnet = Network> | |
void | counter_idegree (NetCounters< Tnet > *counters, std::vector< size_t > d) |
Counts number of vertices with a given in-degree. More... | |
template<> | |
void | counter_idegree (NetCounters< NetworkDense > *counters, std::vector< size_t > d) |
template<typename Tnet = Network> | |
void | counter_odegree (NetCounters< Tnet > *counters, std::vector< size_t > d) |
Counts number of vertices with a given out-degree. More... | |
template<> | |
void | counter_odegree (NetCounters< NetworkDense > *counters, std::vector< size_t > d) |
template<typename Tnet = Network> | |
void | counter_degree (NetCounters< Tnet > *counters, std::vector< size_t > d) |
Counts number of vertices with a given out-degree. More... | |
void | counter_ones (DEFMCounters *counters, int covar_index=-1, std::string vname="", const std::vector< std::string > *x_names=nullptr) |
Prevalence of ones. More... | |
void | counter_logit_intercept (DEFMCounters *counters, size_t n_y, std::vector< size_t > which={}, int covar_index=-1, std::string vname="", const std::vector< std::string > *x_names=nullptr, const std::vector< std::string > *y_names=nullptr) |
void | counter_transition (DEFMCounters *counters, std::vector< size_t > coords, std::vector< bool > signs, size_t m_order, size_t n_y, int covar_index=-1, std::string vname="", const std::vector< std::string > *x_names=nullptr, const std::vector< std::string > *y_names=nullptr) |
Prevalence of ones. More... | |
void | counter_transition_formula (DEFMCounters *counters, std::string formula, size_t m_order, size_t n_y, int covar_index=-1, std::string vname="", const std::vector< std::string > *x_names=nullptr, const std::vector< std::string > *y_names=nullptr) |
Prevalence of ones. More... | |
void | counter_fixed_effect (DEFMCounters *counters, int covar_index, double k, std::string vname="", const std::vector< std::string > *x_names=nullptr) |
Prevalence of ones. More... | |
Returns true if the cell is free | |||
| |||
void | rules_markov_fixed (DEFMRules *rules, size_t markov_order) | ||
Number of edges. More... | |||
void | rules_dont_become_zero (DEFMSupport *support, std::vector< size_t > ids) | ||
Blocks switching a one to zero. More... | |||
void | rule_constrain_support (DEFMSupport *support, size_t pos, double lb, double ub) | ||
Overall functional gains. More... | |||
Counters for network models.
counters | A pointer to a NetCounters object (Counters <Network , NetCounterData >). |
counters | A pointer to a DEFMCounters object (Counters <DEFMArray , DEFMCounterData >). |
|
inline |
Sum of absolute attribute difference between ego and alter.
Definition at line 908 of file network.hpp.
|
inline |
Definition at line 665 of file network.hpp.
|
inline |
Definition at line 610 of file network.hpp.
|
inline |
Counts number of vertices with a given out-degree.
Definition at line 1326 of file network.hpp.
|
inline |
Definition at line 729 of file network.hpp.
|
inline |
Sum of attribute difference between ego and alter to pow(alpha)
Definition at line 953 of file network.hpp.
|
inline |
Number of edges.
Definition at line 152 of file network.hpp.
|
inline |
Prevalence of ones.
counters | Pointer ot a vector of counters |
covar_index | If >= than 0, then the interaction |
Definition at line 693 of file counters.hpp.
|
inline |
Definition at line 1170 of file network.hpp.
|
inline |
Counts number of vertices with a given in-degree.
Definition at line 1123 of file network.hpp.
|
inline |
Definition at line 785 of file network.hpp.
|
inline |
Definition at line 757 of file network.hpp.
|
inline |
Definition at line 215 of file network.hpp.
|
inline |
Number of isolated vertices.
Definition at line 175 of file network.hpp.
|
inline |
Definition at line 338 of file network.hpp.
|
inline |
Definition at line 312 of file network.hpp.
|
inline |
Calculates the logit intercept for the DEFM model.
counters | A pointer to the DEFMCounters object. |
n_y | The number of response variables. |
which | A vector of indices indicating which response variables to use. If empty, all response variables are used. |
covar_index | The index of the covariate to use as the intercept. |
vname | The name of the variable to use as the intercept. If empty, the intercept is set to zero. |
x_names | A pointer to a vector of strings containing the names of the covariates. |
y_names | A pointer to a vector of strings containing the names of the response variables. |
Definition at line 170 of file counters.hpp.
|
inline |
Number of mutual ties.
Definition at line 256 of file network.hpp.
|
inline |
Definition at line 1066 of file network.hpp.
|
inline |
Definition at line 1016 of file network.hpp.
|
inline |
Definition at line 1091 of file network.hpp.
|
inline |
Definition at line 1041 of file network.hpp.
|
inline |
Definition at line 1271 of file network.hpp.
|
inline |
Counts number of vertices with a given out-degree.
Definition at line 1223 of file network.hpp.
|
inline |
Definition at line 862 of file network.hpp.
|
inline |
Definition at line 834 of file network.hpp.
|
inline |
Prevalence of ones.
counters | Pointer ot a vector of counters |
covar_index | If >= than 0, then the interaction |
Definition at line 89 of file counters.hpp.
|
inline |
Definition at line 404 of file network.hpp.
|
inline |
Definition at line 376 of file network.hpp.
|
inline |
Prevalence of ones.
counters | Pointer ot a vector of counters |
covar_index | If >= than 0, then the interaction |
Definition at line 289 of file counters.hpp.
|
inline |
Prevalence of ones.
counters | Pointer ot a vector of counters |
covar_index | If >= than 0, then the interaction |
Definition at line 611 of file counters.hpp.
|
inline |
Definition at line 531 of file network.hpp.
|
inline |
Definition at line 441 of file network.hpp.
NETWORK_COUNTER | ( | init_single_attr | ) |
Definition at line 997 of file network.hpp.
|
inline |
Overall functional gains.
support | Support of a model. |
pos | Position of the focal statistic. |
lb | Lower bound |
ub | Upper bound |
Definition at line 820 of file counters.hpp.
|
inline |
Blocks switching a one to zero.
rules | |
ids | Ids of the variables that will follow this rule. |
Definition at line 761 of file counters.hpp.
|
inline |
Number of edges.
Definition at line 736 of file counters.hpp.