-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolver.h
executable file
·45 lines (36 loc) · 1.43 KB
/
solver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*Lukas Kinder (s3686566), [email protected], Bachelor Project 2021 */
#ifndef SOLVER_H
#define SOLVER_H
#include "graph.h"
//A list to write down arguments that were changed
typedef struct ChangeList {
//the length of the list
int size;
//the arguments
Argument *arguments;
//the label the argument had before
Label *previousLabels;
//the total number of argument in the list
int totalLabeled;
//the number of arguments having the label IN OUT or UNDEC
int nFinalLabeled;
}ChangeList;
//Keep track of characteristics during the search
typedef struct SearchCharacteristics {
int numberIntermediatePropagatied;
int numberBlankPropagated;
int numberErrors;
int numberPropagated;
}SearchCharacteristics;
#include "heuristic.h"
#include "propagateLabels.h"
ChangeList createChangeList();
void freeChangeList(ChangeList changes);
void findComplete(Graph graph, bool printTree, char heuristic);
void findCompleteRec(Graph g,ChangeList *changes, int level, bool printTree, char heuristic, SearchCharacteristics *SC);
void updateSC(ChangeList changes, int currentNumberLabeled, SearchCharacteristics *SC);
void reverseChanges(ChangeList *changes, int till);
void addChange(ChangeList *li, Argument a, Label newLabel, int level, bool printTree, Cause cause);
void printInLevel(char * s, int level);
void printContradiction(Argument a, Label new_label,Cause cause, int level);
#endif