haiku/headers/libs/linprog/Summand.h
Clemens Zeidler 601eded950 - Hide constraint header in Area file.
- Start to replace BList with BObjectList.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-20 06:09:19 +00:00

46 lines
857 B
C++

/*
* Copyright 2007-2008, Christof Lutteroth, lutteroth@cs.auckland.ac.nz
* Copyright 2007-2008, James Kim, jkim202@ec.auckland.ac.nz
* Distributed under the terms of the MIT License.
*/
#ifndef SUMMAND_H
#define SUMMAND_H
#include <ObjectList.h>
namespace LinearProgramming {
class LinearSpec;
class Variable;
/**
* A summand of a linear term.
*/
class Summand {
public:
Summand(double coeff, Variable* var);
~Summand();
double Coeff();
void SetCoeff(double coeff);
Variable* Var();
void SetVar(Variable* var);
private:
double fCoeff;
Variable* fVar;
bool fUsedInPenaltyFunction; //not set yet
};
typedef BObjectList<Summand> SummandList;
} // namespace LinearProgramming
using LinearProgramming::Summand;
using LinearProgramming::SummandList;
#endif // OBJ_FUNCTION_SUMMAND_H