core.h
Go to the documentation of this file.
1 
9 #ifndef _CORE_H_
10 #define _CORE_H_
11 
12 #include <stdio.h>
13 #include <math.h>
14 
15 #include "../types/model.h"
16 #include "../types/examples.h"
17 #include "../types/solution.h"
18 #include "../types/object-index.h"
19 #include "output.h"
20 
28 int nbCombi(Examples* exp, int expIndice);
29 
38 
46 Solution* initAllCombi(Model* mdl, Examples* exp);
47 
54 void combiOutObjectObject(Model* mdl, OutObject* oo, Object*o);
55 
63 Solution* genAllCombi(Model* mdl, Examples* exp);
64 
71 void genAllRelations(Solution* s, Examples* e, Model* m);
72 
86 int getIndex(Examples* exp, ObjectIndex* oi);
87 
97 
103 void genGeneralization(Model *mdl, Solution* s);
104 
111 void genCounterExamples(Model* m, Examples* e, Solution* s);
112 
121 int isObjectInOutObject(Model* m, OutObject* oo, Object* o);
122 
123 #endif // _CORE_H_
Solution * initAllCombi(Model *mdl, Examples *exp)
Init all combinations with last example objects.
Definition: core.c:59
void genGeneralization(Model *mdl, Solution *s)
generalization of our solution(s)
Definition: core.c:258
int nbCombi(Examples *exp, int expIndice)
Computes the number of combinations possible for our examples from an example.
Definition: core.c:11
Contains the output functions, helpers and functions to create and display human readable strings...
Contains all the attributes and relations that compose an OutObject.
Definition: out-object.h:17
void genCounterExamples(Model *m, Examples *e, Solution *s)
Add counter-examples to the solutions.
Definition: core.c:283
void combiOutObjectObject(Model *mdl, OutObject *oo, Object *o)
Combine an OutObject and an Object into an OutObject.
Definition: core.c:94
OutObject * initOutObjectWithObject(Model *mdl, Object *o)
Generate a filled OutObject based on an object values.
Definition: core.c:20
void genAllRelations(Solution *s, Examples *e, Model *m)
Find all the common relation between the objects.
Definition: core.c:203
int isObjectInOutObject(Model *m, OutObject *oo, Object *o)
Check whether an OutObject matches an object or not.
Definition: core.c:303
int getIndex(Examples *exp, ObjectIndex *oi)
Get the index in the array where the combinations of objects are stored : number of example-1 : in...
Definition: core.c:212
Structure that contains the examples and counter-examples of the parsed example file.
Definition: examples.h:20
int isOutObjectIncludeInAnother(Model *mdl, OutObject *oo1, OutObject *oo2)
Is oo1 include in oo2?
Definition: core.c:227
Contains the attributes and relations definitions found in the model file.
Definition: model.h:20
Contains all the attributes and relations that compose an Object.
Definition: object.h:18
Stores a list of indexes When combining multiple Object, the identifier of each of them (rank in the ...
Definition: object-index.h:18
Contains all the possible solutions.
Definition: solution.h:18
Solution * genAllCombi(Model *mdl, Examples *exp)
Generate all the combinations for our examples.
Definition: core.c:124