1 /* 2 * Copyright 2007-2008, Christof Lutteroth, lutteroth@cs.auckland.ac.nz 3 * Copyright 2007-2008, James Kim, jkim202@ec.auckland.ac.nz 4 * Distributed under the terms of the MIT License. 5 */ 6 7 #ifndef SUMMAND_H 8 #define SUMMAND_H 9 10 11 namespace LinearProgramming { 12 13 class LinearSpec; 14 class Variable; 15 16 /** 17 * A summand of a linear term. 18 */ 19 class Summand { 20 21 public: 22 double Coeff(); 23 void SetCoeff(double coeff); 24 Variable* Var(); 25 void SetVar(Variable* var); 26 Summand(double coeff, Variable* var); 27 ~Summand(); 28 29 private: 30 double fCoeff; 31 Variable* fVar; 32 bool fUsedInPenaltyFunction; //not set yet 33 34 }; 35 36 } // namespace LinearProgramming 37 38 using LinearProgramming::Summand; 39 40 #endif // OBJ_FUNCTION_SUMMAND_H 41 42