btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / libs / linprog / Summand.h
blob8c8ff2c0a6e18a53ced2ef8776204e9723217287
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 #ifndef SUMMAND_H
7 #define SUMMAND_H
9 #include <ObjectList.h>
12 namespace LinearProgramming {
14 class LinearSpec;
15 class Variable;
17 /**
18 * A summand of a linear term.
20 class Summand {
21 public:
22 Summand(Summand* summand);
23 Summand(double coeff, Variable* var);
24 ~Summand();
26 double Coeff();
27 void SetCoeff(double coeff);
28 Variable* Var();
29 void SetVar(Variable* var);
31 int32 VariableIndex();
32 private:
33 double fCoeff;
34 Variable* fVar;
37 typedef BObjectList<Summand> SummandList;
39 } // namespace LinearProgramming
41 using LinearProgramming::Summand;
42 using LinearProgramming::SummandList;
45 #endif // OBJ_FUNCTION_SUMMAND_H