haiku/headers/libs/linprog/Summand.h
Ingo Weinhold 5bced18eab ALM/linprog patch by Christof Lutteroth:
* Got rid of class ObjFunctionSummand. Both the constraint summands and
  the objective function summands are now stored using class Summand.
* Some method names are more BeOS compliant now: SetX instead of ChangeX.
* linprog test code now uses new AddConstraint methods.
* CalculateMinSize and CalculateMaxSize did not free the memory they
  allocated.
* Removed inappropriate setter and getter methods.
* Memory allocated in class Constraint is freed now.
* Other small changes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 21:43:32 +00:00

41 lines
675 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
namespace LinearProgramming {
class LinearSpec;
class Variable;
/**
* A summand of a linear term.
*/
class Summand {
public:
double Coeff();
void SetCoeff(double coeff);
Variable* Var();
void SetVar(Variable* var);
Summand(double coeff, Variable* var);
~Summand();
private:
double fCoeff;
Variable* fVar;
};
} // namespace LinearProgramming
using LinearProgramming::Summand;
#endif // OBJ_FUNCTION_SUMMAND_H