Skip to content

Commit 4b475f6

Browse files
committed
Renames "BayesResults" as "OutputBayesResult" in "rat_core"
1 parent b92118a commit 4b475f6

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

cpp/includes/defines.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,12 @@ struct DreamOutput
262262
py::array_t<real_T> CR;
263263
};
264264

265-
const std::string docsBayesResults = R"(The Python binding for the C++ bayesResults struct.
265+
const std::string docsOutputBayesResult = R"(The Python binding for the C++ bayesResults struct.
266266
The results of a Bayesian RAT calculation.
267267
268268
Parameters
269269
----------
270-
predictionIntervals : RATapi.rat_core.orePredictionIntervals
270+
predictionIntervals : RATapi.rat_core.PredictionIntervals
271271
The prediction intervals.
272272
confidenceIntervals : RATapi.rat_core.ConfidenceIntervals
273273
The 65% and 95% confidence intervals for the best fit results.
@@ -282,7 +282,7 @@ chain : np.ndarray
282282
The ``i``'th column of the array contains the chain for parameter ``fitNames[i]``.
283283
)";
284284

285-
struct BayesResults
285+
struct OutputBayesResult
286286
{
287287
PredictionIntervals predictionIntervals;
288288
ConfidenceIntervals confidenceIntervals;

cpp/rat.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,9 @@ ProblemDefinition problemDefinitionFromStruct(const RAT::b_ProblemDefinition pro
510510
return problem_def;
511511
}
512512

513-
BayesResults bayesResultsFromStruct(const RAT::BayesResults results)
513+
OutputBayesResult OutputBayesResultsFromStruct(const RAT::BayesResults results)
514514
{
515-
BayesResults bayesResults;
515+
OutputBayesResult bayesResults;
516516

517517
bayesResults.chain = pyArrayFromRatArray2d(results.chain);
518518

@@ -575,7 +575,7 @@ out_problem_def : Rat.rat_core.ProblemDefinition
575575
The project input with the updated fit values.
576576
results : Rat.rat_core.OutputResult
577577
The results from a RAT calculation.
578-
bayes_result : Rat.rat_core.BayesResults
578+
bayes_result : Rat.rat_core.OutputBayesResult
579579
The extra results if RAT calculation is Bayesian.
580580
)";
581581

@@ -593,7 +593,7 @@ py::tuple RATMain(const ProblemDefinition& problem_def, const Control& control)
593593
out_problem_def.customFiles = problem_def.customFiles.attr("copy")();
594594
return py::make_tuple(out_problem_def,
595595
OutputResultFromStruct(results),
596-
bayesResultsFromStruct(bayesResults));
596+
OutputBayesResultsFromStruct(bayesResults));
597597
}
598598

599599
const std::string docsMakeSLDProfileXY = R"(Creates the profiles for the SLD plots
@@ -787,14 +787,14 @@ PYBIND11_MODULE(rat_core, m) {
787787
.def_readwrite("R_stat", &DreamOutput::R_stat)
788788
.def_readwrite("CR", &DreamOutput::CR);
789789

790-
py::class_<BayesResults>(m, "BayesResults", docsBayesResults.c_str())
790+
py::class_<OutputBayesResult>(m, "OutputBayesResult", docsOutputBayesResult.c_str())
791791
.def(py::init<>())
792-
.def_readwrite("predictionIntervals", &BayesResults::predictionIntervals)
793-
.def_readwrite("confidenceIntervals", &BayesResults::confidenceIntervals)
794-
.def_readwrite("dreamParams", &BayesResults::dreamParams)
795-
.def_readwrite("dreamOutput", &BayesResults::dreamOutput)
796-
.def_readwrite("nestedSamplerOutput", &BayesResults::nestedSamplerOutput)
797-
.def_readwrite("chain", &BayesResults::chain);
792+
.def_readwrite("predictionIntervals", &OutputBayesResult::predictionIntervals)
793+
.def_readwrite("confidenceIntervals", &OutputBayesResult::confidenceIntervals)
794+
.def_readwrite("dreamParams", &OutputBayesResult::dreamParams)
795+
.def_readwrite("dreamOutput", &OutputBayesResult::dreamOutput)
796+
.def_readwrite("nestedSamplerOutput", &OutputBayesResult::nestedSamplerOutput)
797+
.def_readwrite("chain", &OutputBayesResult::chain);
798798

799799
py::class_<Calculation>(m, "Calculation", docsCalculation.c_str())
800800
.def(py::init<>())

0 commit comments

Comments
 (0)