Print approximation type from a constant instead of hardcoded
authorBenjamin Poirier <benjamin.poirier@polymtl.ca>
Wed, 25 Nov 2009 19:41:34 +0000 (14:41 -0500)
committerBenjamin Poirier <benjamin.poirier@polymtl.ca>
Fri, 18 Dec 2009 19:04:17 +0000 (14:04 -0500)
Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
lttv/lttv/sync/event_analysis_chull.c

index e5da4c446ebb5eaea10a01efd1b9852a827c4bb9..4dd073731ebc9180f5ab7ab9e9e0ba35370c205a 100644 (file)
@@ -589,18 +589,19 @@ static void printAnalysisStatsCHull(SyncState* const syncState)
                        FactorsCHull* factorsCHull;
 
                        factorsCHull= &analysisData->stats->allFactors[j][i];
-                       printf("\t\t%3d - %-3d: ", i, j);
+                       printf("\t\t%3d - %-3d: %s", i, j,
+                               approxNames[factorsCHull->type]);
 
                        if (factorsCHull->type == EXACT)
                        {
-                               printf("Exact      a0= % 7g a1= 1 %c %7g\n",
+                               printf("      a0= % 7g a1= 1 %c %7g\n",
                                        factorsCHull->approx->offset,
                                        factorsCHull->approx->drift < 0. ? '-' : '+',
                                        fabs(factorsCHull->approx->drift));
                        }
                        else if (factorsCHull->type == MIDDLE)
                        {
-                               printf("Middle     a0= % 7g a1= 1 %c %7g accuracy %7g\n",
+                               printf("     a0= % 7g a1= 1 %c %7g accuracy %7g\n",
                                        factorsCHull->approx->offset, factorsCHull->approx->drift
                                        - 1. < 0. ? '-' : '+', fabs(factorsCHull->approx->drift -
                                                1.), factorsCHull->accuracy);
@@ -613,14 +614,14 @@ static void printAnalysisStatsCHull(SyncState* const syncState)
                        }
                        else if (factorsCHull->type == FALLBACK)
                        {
-                               printf("Fallback   a0= % 7g a1= 1 %c %7g error= %7g\n",
+                               printf("   a0= % 7g a1= 1 %c %7g error= %7g\n",
                                        factorsCHull->approx->offset, factorsCHull->approx->drift
                                        - 1. < 0. ? '-' : '+', fabs(factorsCHull->approx->drift -
                                                1.), factorsCHull->accuracy);
                        }
                        else if (factorsCHull->type == INCOMPLETE)
                        {
-                               printf("Incomplete\n");
+                               printf("\n");
 
                                if (factorsCHull->min->drift != -INFINITY)
                                {
@@ -639,7 +640,7 @@ static void printAnalysisStatsCHull(SyncState* const syncState)
                        }
                        else if (factorsCHull->type == SCREWED)
                        {
-                               printf("Screwed\n");
+                               printf("\n");
 
                                if (factorsCHull->min != NULL && factorsCHull->min->drift != -INFINITY)
                                {
@@ -658,7 +659,7 @@ static void printAnalysisStatsCHull(SyncState* const syncState)
                        }
                        else if (factorsCHull->type == ABSENT)
                        {
-                               printf("Absent\n");
+                               printf("\n");
                        }
                        else
                        {
This page took 0.025157 seconds and 4 git commands to generate.