#include <float.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
#include "sync_chain.h"
#include "event_analysis_chull.h"
-#ifndef g_info
-#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
-#endif
-
-
typedef enum
{
LOWER,
.finalizeAnalysis= &finalizeAnalysisCHull,
.printAnalysisStats= &printAnalysisStatsCHull,
.graphFunctions= {
- .writeTraceTracePlots= &writeAnalysisGraphsPlotsCHull,
+ .writeTraceTraceForePlots= &writeAnalysisGraphsPlotsCHull,
}
};
[SCREWED]= "Screwed",
};
+
/*
* Analysis module registering function
*/
analysisData= (AnalysisDataCHull*) syncState->analysisData;
- cwd= changeToGraphDir(syncState->graphsDir);
+ cwd= changeToGraphsDir(syncState->graphsDir);
analysisData->graphsData->hullPoints= malloc(syncState->traceNb *
sizeof(FILE**));
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);
}
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)
{
}
else if (factorsCHull->type == SCREWED)
{
- printf("Screwed\n");
+ printf("\n");
if (factorsCHull->min != NULL && factorsCHull->min->drift != -INFINITY)
{
}
else if (factorsCHull->type == ABSENT)
{
- printf("Absent\n");
+ printf("\n");
}
else
{
bmin= factors->min->drift;
bmax= factors->max->drift;
- g_assert_cmpfloat(bmax, >, bmin);
+ g_assert_cmpfloat(bmax, >=, bmin);
factors->approx= malloc(sizeof(Factors));
bhat= (bmax * bmin - 1. + sqrt(1. + pow(bmax, 2.) * pow(bmin, 2.) +