csmapping.h
Go to the documentation of this file.
1 #ifndef CSMAPPINGH
2 #define CSMAPPINGH
3 
4 #include "boolean.h"
5 #include "variables.h"
6 #include "box.h"
7 #include "linear_constraint.h"
8 
17 /************************************************************************************/
22 #define NOREL 0
23 
28 #define REL2VAR 1
29 
34 #define REL2CT 2
35 /************************************************************************************/
36 
53 typedef struct {
57  unsigned int sizeO;
58  unsigned int sizeS;
60  unsigned int *orig;
63  boolean *related;
68 } Tmapping;
69 
85 
94 void CopyMapping(Tmapping *m_dst,Tmapping *m_src);
95 
105 unsigned int GetSizeOriginal(Tmapping *m);
106 
116 unsigned int GetSizeSimple(Tmapping *m);
117 
129 void SetOriginalVarRelation(unsigned int nvo,TLinearConstraint *lc,Tmapping *m);
130 
144 void GetOriginalVarRelation(unsigned int nvo,TLinearConstraint *lc,Tmapping *m);
145 
158 boolean IsInSimple(unsigned int v,Tmapping *m);
159 
172 unsigned int GetVarIDInOriginal(unsigned int v,Tmapping *m);
173 
187 void SimpleFromOriginal(Tbox *o,Tbox *s,Tmapping *m);
188 
200 void SimplePointFromOriginal(double *o,double **s,Tmapping *m);
201 
222 
233 void UpdateOriginalPointFromSimple(double *s,double *o,Tmapping *m);
234 
250 void PrintMapping(FILE *f,Tmapping *m);
251 
264 void LoadMapping(FILE *f,Tmapping *m);
265 
277 void SaveMapping(FILE *f,Tmapping *m);
278 
286 void DeleteMapping(Tmapping *m);
287 
288 #endif
Definition of the boolean type.
void PrintMapping(FILE *f, Tmapping *m)
Prints a mapping.
Definition: csmapping.c:218
Set of variables of a cuiksystem.
Definition: variables.h:38
unsigned int GetSizeSimple(Tmapping *m)
Size of the variable set in the simplified system.
Definition: csmapping.c:125
Definition of the Tvariables type and the associated functions.
A linear constraint with an associated error.
boolean * related
Definition: csmapping.h:63
void UpdateOriginalFromSimple(Tbox *s, Tbox *o, Tmapping *m)
Gets a original box from an simplified one.
Definition: csmapping.c:177
void LoadMapping(FILE *f, Tmapping *m)
Constructor. Loads the mapping information from a file.
Definition: csmapping.c:266
Mapping between the sets of variables in two different cuiksystems.
Definition: csmapping.h:53
void SaveMapping(FILE *f, Tmapping *m)
Saves the mapping information into a file.
Definition: csmapping.c:291
unsigned int GetSizeOriginal(Tmapping *m)
Size of the variable set in the original system.
Definition: csmapping.c:120
void InitMapping(Tvariables *o, Tvariables *s, Tmapping *m)
Constructor.
Definition: csmapping.c:14
void UpdateOriginalPointFromSimple(double *s, double *o, Tmapping *m)
Gets a original point from an simplified one.
Definition: csmapping.c:199
void SetOriginalVarRelation(unsigned int nvo, TLinearConstraint *lc, Tmapping *m)
Set a relation for a variable in the original set.
Definition: csmapping.c:100
unsigned int sizeS
Definition: csmapping.h:58
Definition of the Tbox type and the associated functions.
boolean IsInSimple(unsigned int v, Tmapping *m)
Identify original variables also present in the simple system.
Definition: csmapping.c:130
unsigned int sizeO
Definition: csmapping.h:57
A box.
Definition: box.h:83
void GetOriginalVarRelation(unsigned int nvo, TLinearConstraint *lc, Tmapping *m)
Gets the relation for a variable in the original set with the variables in the simple set...
Definition: csmapping.c:112
unsigned int GetVarIDInOriginal(unsigned int v, Tmapping *m)
Gets the original identifier of a simplified variable.
Definition: csmapping.c:135
void SimpleFromOriginal(Tbox *o, Tbox *s, Tmapping *m)
Gets a simple box from an original one.
Definition: csmapping.c:143
Tvariables * original
Definition: csmapping.h:54
TLinearConstraint * lc
Definition: csmapping.h:65
Definition of the TLinearConstraint type and the associated functions.
Tvariables * simple
Definition: csmapping.h:55
unsigned int * orig
Definition: csmapping.h:60
void SimplePointFromOriginal(double *o, double **s, Tmapping *m)
Gets a simple point from an original one.
Definition: csmapping.c:165
void CopyMapping(Tmapping *m_dst, Tmapping *m_src)
Copy constructor.
Definition: csmapping.c:64
void DeleteMapping(Tmapping *m)
Destructor.
Definition: csmapping.c:310