Skip to content

Commit

Permalink
more debug printing
Browse files Browse the repository at this point in the history
  • Loading branch information
dkogan committed May 16, 2012
1 parent e5a2cb1 commit 695daa3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dogleg.c
Expand Up @@ -541,6 +541,9 @@ static int evaluateStep_adjustTrustRegion(const dogleg_operatingPoint_t* before,
*trustregion *= TRUSTREGION_DECREASE_FACTOR;
else if (rho > TRUSTREGION_INCREASE_THRESHOLD && before->didStepToEdgeOfTrustRegion)
{
if( DOGLEG_DEBUG )
fprintf(stderr, "rho large enough. increasing trust region\n");

*trustregion *= TRUSTREGION_INCREASE_FACTOR;
}

Expand All @@ -559,14 +562,14 @@ static int runOptimizer(dogleg_solverContext_t* ctx)
{
if( DOGLEG_DEBUG )
{
fprintf(stderr, "step %d\n", stepCount);
fprintf(stderr, "\n\n\n");
fprintf(stderr, "step %d\n", stepCount);
}

while(1)
{
if( DOGLEG_DEBUG )
fprintf(stderr, "\n\n");
fprintf(stderr, "\n");

double expectedImprovement =
takeStepFrom(ctx->beforeStep, ctx->afterStep->p, trustregion, ctx);
Expand Down

0 comments on commit 695daa3

Please sign in to comment.