csmapping.h
Go to the documentation of this file.00001 #ifndef CSMAPPINGH
00002 #define CSMAPPINGH
00003
00004 #include "boolean.h"
00005 #include "variables.h"
00006 #include "box.h"
00007 #include "linear_constraint.h"
00008
00017
00022 #define NOREL 0
00023
00028 #define REL2VAR 1
00029
00034 #define REL2CT 2
00035
00036
00053 typedef struct {
00054 Tvariables *original;
00055 Tvariables *simple;
00057 unsigned int sizeO;
00058 unsigned int sizeS;
00060 unsigned int *orig;
00063 boolean *related;
00065 TLinearConstraint *lc;
00068 } Tmapping;
00069
00084 void InitMapping(Tvariables *o,Tvariables *s,Tmapping *m);
00085
00094 void CopyMapping(Tmapping *m_dst,Tmapping *m_src);
00095
00105 unsigned int GetSizeOriginal(Tmapping *m);
00106
00116 unsigned int GetSizeSimple(Tmapping *m);
00117
00129 void SetOriginalVarRelation(unsigned int nvo,TLinearConstraint *lc,Tmapping *m);
00130
00144 void GetOriginalVarRelation(unsigned int nvo,TLinearConstraint *lc,Tmapping *m);
00145
00158 unsigned int GetVarIDInOriginal(unsigned int v,Tmapping *m);
00159
00173 void SimpleFromOriginal(Tbox *o,Tbox *s,Tmapping *m);
00174
00175
00195 void UpdateOriginalFromSimple(Tbox *s,Tbox *o,Tmapping *m);
00196
00212 void PrintMapping(FILE *f,Tmapping *m);
00213
00226 void LoadMapping(FILE *f,Tmapping *m);
00227
00239 void SaveMapping(FILE *f,Tmapping *m);
00240
00248 void DeleteMapping(Tmapping *m);
00249
00250 #endif