haiku/headers/libs/linprog/ObjFunctionSummand.h
Ingo Weinhold a101e99aad Added libalm.so and its dependency liblinprog.so. libalm.so provides a
BLayout implementation (BALMLayout) using the Auckland Layout Model
(ALM). The original ALM was implemented by Christof Lutteroth, the
Haiku/C++ version by James Kim.
The code needs some review, but the test programs seem to work fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 10:51:44 +00:00

40 lines
658 B
C++

#ifndef OBJ_FUNCTION_SUMMAND_H
#define OBJ_FUNCTION_SUMMAND_H
namespace LinearProgramming {
class LinearSpec;
class Variable;
/**
* A summand of the objective function.
*/
class ObjFunctionSummand {
public:
double Coeff();
void SetCoeff(double coeff);
Variable* Var();
void SetVar(Variable* var);
~ObjFunctionSummand();
protected:
ObjFunctionSummand(LinearSpec* ls, double coeff, Variable* var);
private:
LinearSpec* fLS;
double fCoeff;
Variable* fVar;
public:
friend class LinearSpec;
};
} // namespace LinearProgramming
using LinearProgramming::ObjFunctionSummand;
#endif // OBJ_FUNCTION_SUMMAND_H