first try after first fix strsep
This commit is contained in:
parent
fecd2124d7
commit
a8c235bc65
|
@ -11,6 +11,8 @@
|
|||
*/
|
||||
void averageCalculation(long **p, double averageArray[])
|
||||
{
|
||||
printArrayData(p, nRowRawData, nCol);
|
||||
printf("\n");
|
||||
for (int i = 1; i < nCol; i++)
|
||||
{
|
||||
int j = 0;
|
||||
|
@ -19,7 +21,7 @@ void averageCalculation(long **p, double averageArray[])
|
|||
{
|
||||
printf("pij = %ld\n", p[i][j]);
|
||||
averageArray[i - 1] += (double)p[i][j];
|
||||
printf("%f , %ld\n", averageArray[i] , p[i][j]);
|
||||
// printf("%f , %ld\n", averageArray[i], p[i][j]);
|
||||
j++;
|
||||
}
|
||||
averageArray[i] /= nRowRawData;
|
||||
|
|
|
@ -38,9 +38,9 @@ void fillArrayWithRawData(char *rawDataFileName, long **p, int N, int M)
|
|||
for (i = 0; i < N; i++)
|
||||
{
|
||||
long t, c1, c2, c3;
|
||||
while (fscanf(f, "%ld,%ld,%ld,%ld\n", &t, &c1, &c2, &c3))
|
||||
while (fscanf(f, "%ld,%ld,%ld,%ld\n", &t, &c1, &c2, &c3) != EOF)
|
||||
{ // séparation valeur par virgule initiale : csv
|
||||
printf("%ld,%ld,%ld,%ld\n", t, c1, c2, c3);
|
||||
// printf("%ld,%ld,%ld,%ld\n", t, c1, c2, c3);
|
||||
p[i][0] = t;
|
||||
p[i][1] = c1;
|
||||
p[i][2] = c2;
|
||||
|
|
|
@ -96,6 +96,7 @@ void *threadCalculGrowthRate(void *vargp)
|
|||
{
|
||||
rawDataQueue = queueGetNextE(rawDataQueue);
|
||||
fileName = queueGetTabChar(rawDataQueue);
|
||||
printf("%s\n", fileName);
|
||||
if (i < 2)
|
||||
{
|
||||
if (i == 1)
|
||||
|
|
Loading…
Reference in a new issue