monomial.h
Go to the documentation of this file.00001 #ifndef MONOMIALH
00002 #define MONOMIALH
00003
00004 #include "boolean.h"
00005 #include "interval.h"
00006 #include "variables.h"
00007 #include "variable_set.h"
00008
00009 #include <stdlib.h>
00010
00034 typedef struct {
00035 boolean empty;
00036 double ct;
00037 Tvariable_set vars;
00038 } Tmonomial;
00039
00040
00048 void InitMonomial(Tmonomial *f);
00049
00050
00060 void ResetMonomial(Tmonomial *f);
00061
00062
00075 void FixVariableInMonomial(unsigned int nv,double v,Tmonomial *f);
00076
00093 void ReplaceVariableInMonomial(unsigned int nv,double ct,unsigned int nvNew,Tmonomial *f);
00094
00095
00105 boolean EmptyMonomial(Tmonomial *f);
00106
00107
00117 boolean CtMonomial(Tmonomial *f);
00118
00128 boolean QuadraticMonomial(Tmonomial *f);
00129
00130
00140 boolean BilinearMonomial(Tmonomial *f);
00141
00151 boolean LinearMonomial(Tmonomial *f);
00152
00164 unsigned int MonomialOrder(Tmonomial *f);
00165
00174 void CopyMonomial(Tmonomial *f_dst,Tmonomial *f_orig);
00175
00190 unsigned int CmpMonomial(Tmonomial *f1,Tmonomial *f2);
00191
00192
00201 void SetMonomialCt(double k,Tmonomial *f);
00202
00203
00213 double GetMonomialCt(Tmonomial *f);
00214
00224 Tvariable_set *GetMonomialVariables(Tmonomial *f);
00225
00234 void AddCt2Monomial(double k,Tmonomial *f);
00235
00245 void AddVariable2Monomial(unsigned int varid,unsigned int p,Tmonomial *f);
00246
00247
00258 double EvaluateMonomial(double *varValues,Tmonomial *f);
00259
00270 void EvaluateMonomialInt(Tinterval *varValues,Tinterval *i_out,Tmonomial *f);
00271
00281 void DeriveMonomial(unsigned int nv,Tmonomial *df,Tmonomial *f);
00282
00283
00298 void PrintMonomial(FILE *file,boolean first,char **varNames,Tmonomial *f);
00299
00300
00308 void DeleteMonomial(Tmonomial *f);
00309
00310 #endif