Skip to content
Snippets Groups Projects
Commit 19942350 authored by simon.cirilli's avatar simon.cirilli
Browse files

ajout de la structure du programme

parents
No related branches found
No related tags found
No related merge requests found
Makefile 0 → 100644
CC=gcc
COMPILE_OPTS= -Wall -Wextra -g -std=c11 -I/usr/include/libxml2
OPTIM_OPTS= -O3
# il faut lancer docker en mode privileged pour les leak check
SANITIZERS=-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer
LIBS=-lcunit -lm -lxml2
all: prog
prog:src/main.o src/regressionLin.o
$(CC) $^ -o $@ $(LIBS) $(SANITIZERS) $(OPTIM_OPTS)
%.o : %.c
$(CC) $(COMPILE_OPTS) $(OPTIM_OPTS) $(SANITIZERS) -c $^ -o $@
SUBDIR_ROOTS := src
DIRS := . $(shell find $(SUBDIR_ROOTS) -type d)
GARBAGE_PATTERNS := *.o
GARBAGE := $(foreach DIR,$(DIRS),$(addprefix $(DIR)/,$(GARBAGE_PATTERNS)))
clean:
rm -rf $(GARBAGE)
rm -f prog
clear
.PHONY: clean
prog 0 → 100755
File added
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "regressionLin.h"
int main() {
return EXIT_SUCCESS;
}
File added
#include "regressionLin.h"
droite findBestDroite(point* pts){
droite d;
return d;
}
point solvSystem(droite dim1, droite dim2){
point pt;
return pt;
}
point descenteGradient(int precision, droite drt){
point pt;
return pt;
}
#ifndef REGRESSIONLIN_H
#define REGRESSIONLIN_H
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
typedef struct _point {
double x;
double y;
} point;
typedef struct _droite {
double x;
double y;
} droite;
//Analytique
droite findBestDroite(point* pts);
point solvSystem(droite dim1, droite dim2);
//Numérique
point descenteGradient(int precision, droite drt);
#endif
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment