* copyright headers for the files of the libraries linprog and alm * new class Summand for representing summands in a linear constraint * merged class SoftConstraint into class Constraint; Constraint now supports both soft and hard constraint functionality * new AddConstraint methods in class LinearSpec for directly setting constraints with 1 to 4 summands * code cleanups by using aforementioned AddConstraint methods * a new very simple test application for alm * some style corrections git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24108 a95241bf-73f2-0310-859d-f6bbb57e9c96
44 lines
800 B
C++
44 lines
800 B
C++
/*
|
|
* Copyright 2007-2008, Christof Lutteroth, [email protected]
|
|
* Copyright 2007-2008, James Kim, [email protected]
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
|
|
#ifndef OBJ_FUNCTION_SUMMAND_H
|
|
#define OBJ_FUNCTION_SUMMAND_H
|
|
|
|
#include "Summand.h"
|
|
|
|
|
|
namespace LinearProgramming {
|
|
|
|
class LinearSpec;
|
|
class Variable;
|
|
|
|
/**
|
|
* A summand of the objective function.
|
|
*/
|
|
class ObjFunctionSummand : public Summand {
|
|
|
|
public:
|
|
void SetCoeff(double coeff);
|
|
void SetVar(Variable* var);
|
|
~ObjFunctionSummand();
|
|
|
|
protected:
|
|
ObjFunctionSummand(LinearSpec* ls, double coeff, Variable* var);
|
|
|
|
private:
|
|
LinearSpec* fLS;
|
|
|
|
public:
|
|
friend class LinearSpec;
|
|
|
|
};
|
|
|
|
} // namespace LinearProgramming
|
|
|
|
using LinearProgramming::ObjFunctionSummand;
|
|
|
|
#endif // OBJ_FUNCTION_SUMMAND_H
|