Skip to content

Commit 5317439

Browse files
committed
updated output during estimation
1 parent 88110f5 commit 5317439

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

panicmage.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,19 +542,25 @@ if (skipall_flag == 0) {
542542
else{
543543
//compute the symbolic formula in advance
544544
// do this only once and give the functions to my_f_symbolic
545+
cout << "Initializing the tree structure...\n";
545546
rootTree(intree,NULL);
546547
unprob_symb(intree);
547548
initialize_tree(intree,leaves);
549+
cout << "done.\nComputing probabilities along the tree...\n";
548550
// cout << "We did get past the initialize tree\n";
549551
// check_probs(tree,anzahl,para->rhoS);
550552
comp_pkfhs(intree,leaves,x);
553+
cout << "done.\nEstimation of theta and rho...\n";
551554
// cout << "We computed the probabillties within the tree\n";
552555
// check_probs(tree,anzahl,para->rhoS)
553556
treegfs_symbolic_fast(intree,leaves,theogfs_symb_fast,x);
554557
for(i=0; i<leaves; i++){
555558
paraS->symbolicgfs[i] = theogfs_symb_fast[i];
559+
// printf("\n\n\n\n");
560+
// cout << theogfs_symb_fast[i];
556561
}
557-
// cout << "We successfully called treegfs_symbolic_fast\n";
562+
563+
// cout << "We successfully called treegfs_symbolic_fast\n";
558564
estimate_symbolic(&theta_hat,&rho_hat,paraS);
559565
}
560566
}

source/treesymbolic.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ void addtogfs(Node *node, int leaves, ex *zeiger, const ex & rhoS, int k){
419419
void treegfs_symbolic_fast(Node *tree, int leaves, ex *gfs_k_symb, const ex & rhoS){
420420
int k;
421421
ex *zeiger;
422+
// printf("called treegfs_symbolic_fast\n");
422423
for(k = 1; k <= leaves; k++){
423424
// printf("%d aus %d\n", k, leaves);
424425
zeiger = &gfs_k_symb[k-1];
@@ -507,6 +508,7 @@ double my_f_symbolic (const gsl_vector *v, void *params)
507508
float *theogfs_float;
508509
theogfs_float = new float[anzahl];
509510
for (inc = 0; inc < anzahl; inc++){
511+
// printf("%d\n",inc);
510512
theogfs_float[inc] = to_double(ex_to<numeric>(mysymbolicgfs[inc].subs(para->rhoS == rho).evalf()));
511513
}
512514

@@ -593,7 +595,7 @@ void estimate_symbolic(float *theta_hat, float *rho_hat, Params_symbolic *paraS)
593595
int status;
594596
double size;
595597

596-
// cout << "soweit alles ok\n";
598+
// cout << "so far fine\n";
597599

598600
/*optional set the starting points to a first simple estimate*/
599601

@@ -651,14 +653,14 @@ void estimate_symbolic(float *theta_hat, float *rho_hat, Params_symbolic *paraS)
651653

652654
if (status == GSL_SUCCESS)
653655
{
654-
// printf ("converged to minimum at\n");
656+
printf("converged to minimum at\n");
655657
}
656658

657-
// printf ("%5d %10.3e %10.3e f() = %7.3f size = %.3f\n",
658-
// iter,
659-
// gsl_vector_get (s->x, 0),
660-
// gsl_vector_get (s->x, 1),
661-
// s->fval, size);
659+
printf ("%5zu %10.3e %10.3e f() = %7.3f size = %.3f\n",
660+
iter,
661+
gsl_vector_get (s->x, 0),
662+
gsl_vector_get (s->x, 1),
663+
s->fval, size);
662664
}
663665
while(status == GSL_CONTINUE && iter < 100);
664666

0 commit comments

Comments
 (0)