Compare commits

..

No commits in common. "e1c631229d108431e40e070c1e938e7b02e539f6" and "e06c7602e0dade3bd0d2e88e88cacaab8de6f9ea" have entirely different histories.

7 changed files with 6 additions and 160 deletions

82
.gitignore vendored
View file

@ -1,84 +1,4 @@
*.TXT
*.png
*.exe
*.csv
Code-C/main
Code-C/exec
Makefile
# Created by https://www.toptal.com/developers/gitignore/api/cmake,c
# Edit at https://www.toptal.com/developers/gitignore?templates=cmake,c
### C ###
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
### CMake ###
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
### CMake Patch ###
# External projects
*-prefix/
# End of https://www.toptal.com/developers/gitignore/api/cmake,c
*.csv

View file

@ -1,10 +0,0 @@
cmake_minimum_required(VERSION 2.6)
project(Traitement-signal-plantes C)
include(CTest)
enable_testing()
set(CMAKE_C_FLAGS "-std=c99 -g -Wall")
add_executable(exect fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c main.c)
#add_executable(exect main.c simulateFlux.c queue.c power.c growthRate.c average.c getArray.c fileGestion.c)

5
Code-C/Makefile Normal file
View file

@ -0,0 +1,5 @@
CC = gcc
all:
$(CC) -g -Wall fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c main.c -lm -lpthread -o main
./main < ../02400031.TXT

View file

@ -1,5 +0,0 @@
CC = gcc
all:
$(CC) -g fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c main.c -lm -lpthread -o main
./main < ../02400031.TXT

View file

@ -82,15 +82,6 @@ void *threadCalculGrowthRate(void * vargp){
fileName = queueGetTabChar(rawDataQueue);
if(i < 2){
if(i == 1){
<<<<<<< HEAD
printf("zedfghjio\n");
powerFunction(fileName, dataLign[1]);
growthRateFunction(**dataLign);
}else{
printf("zedfghjio\n");
powerFunction(fileName, dataLign[0]);
=======
powerFunction(fileName, dataLignPw);
averageFunction(fileName , dataLignAv);
growthRateFunction(dataLignPw , "growthRatePw.csv");
@ -98,7 +89,6 @@ void *threadCalculGrowthRate(void * vargp){
}else{
averageFunction(fileName , dataLignAv);
powerFunction(fileName, dataLignPw);
>>>>>>> e06c7602e0dade3bd0d2e88e88cacaab8de6f9ea
}
i++;
}else{
@ -106,17 +96,10 @@ void *threadCalculGrowthRate(void * vargp){
dataLignPw[0][y] = dataLignPw[1][y];
dataLignAv[0][y] = dataLignAv[1][y];
}
<<<<<<< HEAD
printf("zedfghjio\n");
powerFunction(fileName, dataLign[1]);
growthRateFunction(**dataLign);
=======
powerFunction(fileName, dataLignPw);
averageFunction(fileName , dataLignAv);
growthRateFunction(dataLignPw,"growthRatePw.csv");
growthRateFunction(dataLignPw,"growthRateAv.csv");
>>>>>>> e06c7602e0dade3bd0d2e88e88cacaab8de6f9ea
}
remove(fileName);
}

View file

@ -33,7 +33,6 @@ void powerCalculation(long **p, double powerArray[]){
*/
void powerFunction(char* rawDataFileName, double **pw){
long **p = getRawDataArray(rawDataFileName);
printArrayData(p,nRow,nCol);
double pww[nCol-1];
if(p !=NULL){
if(pw == NULL){

View file

@ -1,46 +0,0 @@
int main(int argc, char *argv[]){
if (argc == 1)
usage(argc, argv);
// start test
fprintf(stderr, "=> Start test \"%s\"\n", argv[1]);
int ok = 1;
if (strcmp("dummy", argv[1]) == 0)
ok = test_dummy();
else if (strcmp("is_lighted",argv[1]) == 0){
ok = test_game_is_lighted();
}else if(strcmp("has_error",argv[1]) == 0){
ok = test_game_has_error();
}else if(strcmp("check_move",argv[1]) == 0){
ok = test_game_check_move();
}else if(strcmp("game_is_over",argv[1]) == 0){
ok = test_game_is_over();
}else if(strcmp("play_move",argv[1]) == 0){
ok = test_game_play_move();
}else if(strcmp("game_restart",argv[1]) == 0){
ok = test_game_restart();
}else if(strcmp("update_flags",argv[1]) == 0){
ok = test_game_update_flags();
}else if(strcmp("default_solution",argv[1]) == 0){
ok = test_game_default_solution();
}else{
fprintf(stderr, "Error: test \"%s\" not found!\n", argv[1]);
exit(EXIT_FAILURE);
}
// print test result
if (ok == 0)
{
fprintf(stderr, "Test \"%s\" finished: SUCCESS\n", argv[1]);
return EXIT_SUCCESS;
}
else
{
fprintf(stderr, "Test \"%s\" finished: FAILURE\n", argv[1]);
return EXIT_FAILURE;
}
}