Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/madX/mad_const.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #ifndef MAD_CONST_H
0002 #define MAD_CONST_H
0003 
0004 // types
0005 
0006 struct node;
0007 struct sequence;
0008 struct expression;
0009 struct command;
0010 
0011 struct constraint /* contains one constraint */
0012 {
0013   char name[NAME_L];
0014   int  type;                    /* 1 minimum */
0015                                 /* 2 maximum */
0016                                 /* 3 both 1 + 2 */
0017                                 /* 4 value */
0018   int stamp;
0019   int n_pos, index;
0020   double value, c_min, c_max, weight, evaluated;
0021   struct expression *ex_value, *ex_c_min, *ex_c_max;
0022 };
0023 
0024 struct constraint_list /* contains list of constraints */
0025 {
0026   int stamp;
0027   char name[NAME_L];
0028   int  max,                           /* max. pointer array size */
0029        curr;                          /* current occupation */
0030   struct constraint** constraints;    /* command pointer list */
0031 };
0032 
0033 // interface
0034 
0035 struct constraint* clone_constraint(struct constraint*);
0036 struct constraint* delete_constraint(struct constraint*);   // used by mad_match.c
0037 void               dump_constraint(struct constraint*);     // used by mad_node.c
0038 
0039 struct constraint_list* new_constraint_list(int length);
0040 struct constraint_list* delete_constraint_list(struct constraint_list*);
0041 //void                  dump_constraint_list(struct constraint_list*);
0042 
0043 void fill_constraint_list(int type, struct command*, struct constraint_list*);
0044 void update_sequ_constraints(struct sequence*, struct constraint_list*);
0045 void update_node_constraints(struct node*, struct constraint_list*, int index);
0046 
0047 int  constraint_name(char* name, int* name_l, int* index);
0048 int  next_constr_namepos(char* name);
0049 int  next_constraint(char* name, int* name_l, int* type, double* value, double* c_min, double* c_max, double* weight, int* pos, double* evaluated, char* node_name, int* nn_len);
0050 int  next_global(char* name, int* name_l, int* type, double* value, double* c_min, double* c_max, double* weight);
0051 
0052 #endif // MAD_CONST_H
0053