Skip to content

Commit abded50

Browse files
authored
Updates cpp with new c struct names (#136)
1 parent 0bd4fad commit abded50

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

cpp/RAT

Submodule RAT updated 433 files

cpp/rat.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ class EventBridge
221221
};
222222
};
223223

224-
RAT::struct1_T createStruct1(const NameStore& names)
224+
RAT::b_ParamNames createParamNamesStruct(const NameStore& names)
225225
{
226-
RAT::struct1_T names_struct;
226+
RAT::b_ParamNames names_struct;
227227
names_struct.params = customCaller("NameStore.params", pyListToRatCellWrap02d, names.params);
228228
names_struct.backgroundParams = customCaller("NameStore.backgroundParams", pyListToRatCellWrap02d, names.backgroundParams);
229229
names_struct.scalefactors = customCaller("NameStore.scalefactors", pyListToRatCellWrap02d, names.scalefactors);
@@ -237,9 +237,9 @@ RAT::struct1_T createStruct1(const NameStore& names)
237237
return names_struct;
238238
}
239239

240-
RAT::struct2_T createStruct2(const Checks& checks)
240+
RAT::CheckFlags createCheckFlagsStruct(const Checks& checks)
241241
{
242-
RAT::struct2_T checks_struct;
242+
RAT::CheckFlags checks_struct;
243243
checks_struct.params = customCaller("Checks.params", pyArrayToRatRowArray1d, checks.params);
244244
checks_struct.backgroundParams = customCaller("Checks.backgroundParams", pyArrayToRatRowArray1d, checks.backgroundParams);
245245
checks_struct.scalefactors = customCaller("Checks.scalefactors", pyArrayToRatRowArray1d, checks.scalefactors);
@@ -252,9 +252,9 @@ RAT::struct2_T createStruct2(const Checks& checks)
252252
return checks_struct;
253253
}
254254

255-
RAT::struct0_T createStruct0(const ProblemDefinition& problem)
255+
RAT::b_ProblemDefinition createProblemDefinitionStruct(const ProblemDefinition& problem)
256256
{
257-
RAT::struct0_T problem_struct;
257+
RAT::b_ProblemDefinition problem_struct;
258258

259259
stringToRatBoundedArray(problem.TF, problem_struct.TF.data, problem_struct.TF.size);
260260
problem_struct.resample = customCaller("Problem.resample", pyArrayToRatRowArray1d, problem.resample);
@@ -300,17 +300,17 @@ RAT::struct0_T createStruct0(const ProblemDefinition& problem)
300300
problem_struct.priorNames = customCaller("Problem.priorNames", pyListToRatCellWrap01d, problem.priorNames);
301301
problem_struct.priorValues = customCaller("Problem.priorValues", pyArrayToRatArray2d, problem.priorValues);
302302

303-
problem_struct.names = createStruct1(problem.names);
304-
problem_struct.checks = createStruct2(problem.checks);
303+
problem_struct.names = createParamNamesStruct(problem.names);
304+
problem_struct.checks = createCheckFlagsStruct(problem.checks);
305305

306306

307307
return problem_struct;
308308
}
309309

310310

311-
RAT::struct3_T createStruct3(const Limits& limits)
311+
RAT::ProblemLimits createProblemLimitsStruct(const Limits& limits)
312312
{
313-
RAT::struct3_T limits_struct;
313+
RAT::ProblemLimits limits_struct;
314314
limits_struct.params = customCaller("Limits.params", pyArrayToRatArray2d, limits.params);
315315
limits_struct.backgroundParams = customCaller("Limits.backgroundParams", pyArrayToRatArray2d, limits.backgroundParams);
316316
limits_struct.scalefactors = customCaller("Limits.scalefactors", pyArrayToRatArray2d, limits.scalefactors);
@@ -324,9 +324,9 @@ RAT::struct3_T createStruct3(const Limits& limits)
324324
}
325325

326326

327-
RAT::struct4_T createStruct4(const Control& control)
327+
RAT::Controls createControlsStruct(const Control& control)
328328
{
329-
RAT::struct4_T control_struct;
329+
RAT::Controls control_struct;
330330
control_struct.funcTolerance = control.funcTolerance;
331331
control_struct.maxFuncEvals = control.maxFuncEvals;
332332
control_struct.maxIterations = control.maxIterations;
@@ -360,7 +360,7 @@ RAT::struct4_T createStruct4(const Control& control)
360360
return control_struct;
361361
}
362362

363-
OutputResult OutputResultFromStruct5T(const RAT::struct5_T result)
363+
OutputResult OutputResultFromStruct(const RAT::Results result)
364364
{
365365
// Copy problem to output
366366
OutputResult output_result;
@@ -470,7 +470,7 @@ OutputResult OutputResultFromStruct5T(const RAT::struct5_T result)
470470
return output_result;
471471
}
472472

473-
ProblemDefinition problemDefinitionFromStruct0T(const RAT::struct0_T problem)
473+
ProblemDefinition problemDefinitionFromStruct(const RAT::b_ProblemDefinition problem)
474474
{
475475
ProblemDefinition problem_def;
476476

@@ -540,7 +540,7 @@ ProblemDefinition problemDefinitionFromStruct0T(const RAT::struct0_T problem)
540540
return problem_def;
541541
}
542542

543-
BayesResults bayesResultsFromStruct8T(const RAT::struct8_T results)
543+
BayesResults bayesResultsFromStruct(const RAT::BayesResults results)
544544
{
545545
BayesResults bayesResults;
546546

@@ -614,20 +614,20 @@ bayes_result : Rat.rat_core.BayesResults
614614

615615
py::tuple RATMain(const ProblemDefinition& problem_def, const Limits& limits, const Control& control)
616616
{
617-
RAT::struct0_T problem_def_struct = createStruct0(problem_def);
618-
RAT::struct3_T limits_struct = createStruct3(limits);
619-
RAT::struct4_T control_struct = createStruct4(control);
617+
RAT::b_ProblemDefinition problem_def_struct = createProblemDefinitionStruct(problem_def);
618+
RAT::ProblemLimits limits_struct = createProblemLimitsStruct(limits);
619+
RAT::Controls control_struct = createControlsStruct(control);
620620
// Output
621-
RAT::struct5_T results;
622-
RAT::struct8_T bayesResults;
621+
RAT::Results results;
622+
RAT::BayesResults bayesResults;
623623
// Call the entry-point
624624
RAT::RATMain(&problem_def_struct, &limits_struct, &control_struct, &results, &bayesResults);
625625
// Copy result to output
626-
auto out_problem_def = problemDefinitionFromStruct0T(problem_def_struct);
626+
auto out_problem_def = problemDefinitionFromStruct(problem_def_struct);
627627
out_problem_def.customFiles = problem_def.customFiles.attr("copy")();
628628
return py::make_tuple(out_problem_def,
629-
OutputResultFromStruct5T(results),
630-
bayesResultsFromStruct8T(bayesResults));
629+
OutputResultFromStruct(results),
630+
bayesResultsFromStruct(bayesResults));
631631
}
632632

633633
const std::string docsMakeSLDProfileXY = R"(Creates the profiles for the SLD plots

0 commit comments

Comments
 (0)