Skip to content

Commit e5e0560

Browse files
committed
Added reset method to rfx container
1 parent 77af5a9 commit e5e0560

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/stochtree/random_effects.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,15 @@ class RandomEffectsContainer {
263263
int NumSamples() {return num_samples_;}
264264
int NumComponents() {return num_components_;}
265265
int NumGroups() {return num_groups_;}
266+
void Reset() {
267+
num_samples_ = 0;
268+
num_components_ = 0;
269+
num_groups_ = 0;
270+
beta_.clear();
271+
alpha_.clear();
272+
xi_.clear();
273+
sigma_xi_.clear();
274+
}
266275
std::vector<double>& GetBeta() {return beta_;}
267276
std::vector<double>& GetAlpha() {return alpha_;}
268277
std::vector<double>& GetXi() {return xi_;}

0 commit comments

Comments
 (0)