xref: /haiku/headers/libs/linprog/Summand.h (revision d2e1e872611179c9cfaa43ce11bd58b1e3554e4b)
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 
33 };
34 
35 }	// namespace LinearProgramming
36 
37 using LinearProgramming::Summand;
38 
39 #endif	// OBJ_FUNCTION_SUMMAND_H
40 
41