Skip to content

Commit

Permalink
Implementing getter for support_sizes(_acc)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Oct 4, 2023
1 parent 7a60faa commit 8289bb4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/barry/model-bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ class Model {
*/
///@{
std::vector< std::vector< double > > * get_stats_target();
std::vector< double > * get_stats_support();
std::vector< double > * get_stats_support(); ///< Sufficient statistics of the support(s)
std::vector< size_t > * get_stats_support_sizes(); ///< Number of vectors included in the support.
std::vector< size_t > * get_stats_support_sizes_acc(); ///< Accumulated number of vectors included in the support.
std::vector< size_t > * get_arrays2support();
std::vector< std::vector< Array_Type > > * get_pset_arrays();
std::vector< std::vector<double> > * get_pset_stats(); ///< Statistics of the support(s)
Expand Down
16 changes: 16 additions & 0 deletions include/barry/model-meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,22 @@ Model<Array_Type,Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type>::get_sta
return &stats_support;
}

// Implementation of get_stats_support_sizes()
template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
inline std::vector< size_t > *
Model<Array_Type,Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type>::get_stats_support_sizes()
{
return &stats_support_sizes;
}

// Implementation of get_stats_support_sizes_acc()
template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
inline std::vector< size_t > *
Model<Array_Type,Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type>::get_stats_support_sizes_acc()
{
return &stats_support_sizes_acc;
}

template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
inline std::vector< size_t > *
Model<Array_Type,Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type>::get_arrays2support()
Expand Down

0 comments on commit 8289bb4

Please sign in to comment.