Skip to content

Commit

Permalink
Teach ComputeSetOriginalStarts to reset inform code
Browse files Browse the repository at this point in the history
  • Loading branch information
jpritikin committed Apr 9, 2019
1 parent 0e4aaec commit 4dcb8e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Compute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1956,6 +1956,7 @@ const double ComputeEM::MIDDLE_START = 0.105360515657826281366; // -log(.9) cons
const double ComputeEM::MIDDLE_END = 0.001000500333583534363566; // -log(.999) constexpr

struct ComputeSetOriginalStarts : public omxCompute {
virtual bool resetInform() { return false; };
virtual void computeImpl(FitContext *fc);
};

Expand Down Expand Up @@ -3642,6 +3643,7 @@ void ComputeJacobian::reportResults(FitContext *fc, MxRList *slots, MxRList *out

void ComputeSetOriginalStarts::computeImpl(FitContext *fc)
{
fc->setInform(INFORM_UNINITIALIZED);
auto &startingValues = Global->startingValues;
auto &vars = fc->varGroup->vars;
for (int vx=0; vx < int(vars.size()); ++vx) {
Expand Down
2 changes: 1 addition & 1 deletion src/Compute.h
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class omxCompute {
const char *name;
FreeVarGroup *varGroup;
omxCompute();
virtual bool resetInform() { return true; };
virtual bool resetInform() { return true; }; // rename to accumulateInform?
virtual void initFromFrontend(omxState *, SEXP rObj);
void compute(FitContext *fc);
void computeWithVarGroup(FitContext *fc);
Expand Down

0 comments on commit 4dcb8e2

Please sign in to comment.