Page principale | Hiérarchie des classes | Liste des composants | Liste des fichiers | Composants

ExprNode.h

00001 #ifndef __EXPRNODE_H_
00002 #define __EXPRNODE_H_
00003 
00004 #include "Config.h"
00005 #include "Num.h"
00006 #include "NumVar.h"
00007 #include "LagrangianParam.h"
00008 //class LagrangianParam;
00010 /*
00011   Elle est constituée
00012   - d'un coefficient de type "Num"
00013   - d'une variable de type "NumVar"
00014   - d'un coefficent Lagrangien
00015   \n Elle represente un groupe  "+ Num * NumVar" dans une expressions linéaire
00016 */
00017 
00018 class ExprNode
00019 {
00020   protected:
00021     Num coefficient; 
00022     NumVar variable; 
00023     LagrangianParam mult; 
00024   public:
00026     ExprNode(const Num & _coefficient = Num(0.0f),
00027              const NumVar & _variable = NumVar(),
00028              const LagrangianParam & _mult = LagrangianParam())
00029     : coefficient(_coefficient), variable(_variable), mult(_mult)
00030     {}
00031  
00035     Num       GetCoefficient()  const { return coefficient; }
00039     void SetCoefficient( float coef ) { coefficient = Num(coef); }
00040     
00044     NumVar    GetVariable()     const { return variable;    }
00045     
00049     LagrangianParam   GetLagrangianParam()    const { return mult;   }   
00050 }; 
00051 
00052 #endif

Généré le Mon Jul 18 23:07:40 2005 pour Modelib par doxygen 1.3.6