core.h File Reference

File containing the core that generates the solutions. More...

#include <stdio.h>
#include <math.h>
#include "../types/model.h"
#include "../types/examples.h"
#include "../types/solution.h"
#include "../types/object-index.h"
#include "output.h"
Include dependency graph for core.h:

Go to the source code of this file.

Functions

int nbCombi (Examples *exp, int expIndice)
 Computes the number of combinations possible for our examples from an example. More...
 
OutObjectinitOutObjectWithObject (Model *mdl, Object *o)
 Generate a filled OutObject based on an object values. More...
 
SolutioninitAllCombi (Model *mdl, Examples *exp)
 Init all combinations with last example objects. More...
 
void combiOutObjectObject (Model *mdl, OutObject *oo, Object *o)
 Combine an OutObject and an Object into an OutObject. More...
 
SolutiongenAllCombi (Model *mdl, Examples *exp)
 Generate all the combinations for our examples. More...
 
void genAllRelations (Solution *s, Examples *e, Model *m)
 Find all the common relation between the objects. More...
 
int getIndex (Examples *exp, ObjectIndex *oi)
 Get the index in the array where the combinations of objects are stored

\(n\): number of example-1
\(X_i\): index of the object in the example i
\(O_j\): number of objects in the example j
And our continuous bijection (homomorphism) formula:
\((\sum\limits_{i=0}^{n-1} (X_i*\prod\limits_{j=i+1}^{n} O_j))+X_n\). More...
 
int isOutObjectIncludeInAnother (Model *mdl, OutObject *oo1, OutObject *oo2)
 Is oo1 include in oo2? More...
 
void genGeneralization (Model *mdl, Solution *s)
 generalization of our solution(s) More...
 
void genCounterExamples (Model *m, Examples *e, Solution *s)
 Add counter-examples to the solutions. More...
 
int isObjectInOutObject (Model *m, OutObject *oo, Object *o)
 Check whether an OutObject matches an object or not. More...
 

Detailed Description

File containing the core that generates the solutions.

Author
Bastien Philip (ebatsin)
Gaël Foppolo (gaelfoppolo)

Function Documentation

void combiOutObjectObject ( Model mdl,
OutObject oo,
Object o 
)

Combine an OutObject and an Object into an OutObject.

Parameters
mdlPointer to the Model
ooPointer to the OutObject to combine with Object
oPointer to the Object to combine with OutObject

Here is the call graph for this function:

Here is the caller graph for this function:

Solution* genAllCombi ( Model mdl,
Examples exp 
)

Generate all the combinations for our examples.

Parameters
mdlPointer to the Model
expPointer to our Examples to combine
Returns
Pointer to Solution containing all our combinations

Here is the call graph for this function:

void genAllRelations ( Solution s,
Examples e,
Model m 
)

Find all the common relation between the objects.

Parameters
sThe solution generated by the genAllCombi function
eThe examples to search the relations into
mThe model to use the relations
void genCounterExamples ( Model m,
Examples e,
Solution s 
)

Add counter-examples to the solutions.

Parameters
mPointer to the Model
ePointer to the examples
sPointer to the solution

Here is the call graph for this function:

void genGeneralization ( Model mdl,
Solution s 
)

generalization of our solution(s)

Parameters
mdlPointer to the Model
sPointer to the Solution

Here is the call graph for this function:

int getIndex ( Examples exp,
ObjectIndex oi 
)

Get the index in the array where the combinations of objects are stored

\(n\): number of example-1
\(X_i\): index of the object in the example i
\(O_j\): number of objects in the example j
And our continuous bijection (homomorphism) formula:
\((\sum\limits_{i=0}^{n-1} (X_i*\prod\limits_{j=i+1}^{n} O_j))+X_n\).

Parameters
expPointer to the examples
oiPointer to the objects's indexes
Returns
An integer

Here is the caller graph for this function:

Solution* initAllCombi ( Model mdl,
Examples exp 
)

Init all combinations with last example objects.

Parameters
mdlPointer to the Model
expPointer to the Examples
Returns
Pointer to Solution inizialized

Here is the call graph for this function:

Here is the caller graph for this function:

OutObject* initOutObjectWithObject ( Model mdl,
Object o 
)

Generate a filled OutObject based on an object values.

Parameters
mdlPointer to the Model
oPointer to the Object
Returns
Pointer to OutObject

Here is the call graph for this function:

Here is the caller graph for this function:

int isObjectInOutObject ( Model m,
OutObject oo,
Object o 
)

Check whether an OutObject matches an object or not.

Parameters
mThe model
ooThe OutObject that you want to know if it matches the Object
oThe object
Returns
Returns 1 if the OutObject matches. 0 otherwise

Here is the call graph for this function:

Here is the caller graph for this function:

int isOutObjectIncludeInAnother ( Model mdl,
OutObject oo1,
OutObject oo2 
)

Is oo1 include in oo2?

Parameters
mdlPointer to Model
oo1Pointer to the first OutObject
oo2Pointer to the second OutObject
Returns
1 if oo1 include in oo2, 0 else

Here is the call graph for this function:

Here is the caller graph for this function:

int nbCombi ( Examples exp,
int  expIndice 
)

Computes the number of combinations possible for our examples from an example.

Parameters
expPointer to our array of exemple
expIndiceThe example number
Returns
The number of combinations starting at expIndice example

Computes the number of combinations possible for our examples from an example.

Author
Bastien Philip (ebatsin)
Gaël Foppolo (gaelfoppolo)

Here is the caller graph for this function: