Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 56b7068

Browse files
committed
Skeleton json C++ class
1 parent 07db303 commit 56b7068

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/stochtree.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,18 @@ class LeafVarianceModelCpp {
383383
StochTree::LeafNodeHomoskedasticVarianceModel var_model_;
384384
};
385385

386+
class ForestDatasetCpp {
387+
public:
388+
ForestDatasetCpp() {
389+
// Initialize pointer to C++ nlohmann::json class
390+
json_ = std::make_unique<nlohmann::json>();
391+
}
392+
~ForestDatasetCpp() {}
393+
394+
private:
395+
std::unique_ptr<nlohmann::json> json_;
396+
};
397+
386398
// Implementation of UpdateResidual
387399
void ForestContainerCpp::UpdateResidual(ForestDatasetCpp& dataset, ResidualCpp& residual, ForestSamplerCpp& sampler, bool requires_basis, int forest_num, bool add) {
388400
// Determine whether or not we are adding forest_num to the residuals

0 commit comments

Comments
 (0)