Skip to content

Commit 8c225ed

Browse files
committed
Updated Random Effects Classes
1 parent 560922a commit 8c225ed

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

include/stochtree/random_effects.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ class LabelMapper {
7676
bool CategoryNumber(int32_t category_id) {
7777
return label_map_[category_id];
7878
}
79-
std::vector<int32_t> Keys() {return keys_;}
79+
std::vector<int32_t>& Keys() {return keys_;}
80+
std::map<int32_t, int32_t>& Map() {return label_map_;}
8081
private:
8182
std::map<int32_t, int32_t> label_map_;
8283
std::vector<int32_t> keys_;
@@ -252,10 +253,10 @@ class RandomEffectsContainer {
252253
int NumSamples() {return num_samples_;}
253254
int NumComponents() {return num_components_;}
254255
int NumGroups() {return num_groups_;}
255-
std::vector<double> GetBeta() {return beta_;}
256-
std::vector<double> GetAlpha() {return alpha_;}
257-
std::vector<double> GetXi() {return xi_;}
258-
std::vector<double> GetSigma() {return sigma_xi_;}
256+
std::vector<double>& GetBeta() {return beta_;}
257+
std::vector<double>& GetAlpha() {return alpha_;}
258+
std::vector<double>& GetXi() {return xi_;}
259+
std::vector<double>& GetSigma() {return sigma_xi_;}
259260
private:
260261
int num_samples_;
261262
int num_components_;

0 commit comments

Comments
 (0)