haiku/headers/libs/linprog/PenaltyFunction.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

51 lines
905 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 PENALTY_FUNCTION_H
#define PENALTY_FUNCTION_H
#include <List.h>
namespace LinearProgramming {
class LinearSpec;
class Variable;
/**
* Penalty function.
*/
class PenaltyFunction {
protected:
PenaltyFunction(LinearSpec* ls, Variable* var, BList* xs, BList* gs);
public:
~PenaltyFunction();
const Variable* Var() const;
const BList* Xs() const;
const BList* Gs() const;
private:
LinearSpec* fLS;
Variable* fVar;
BList* fXs; // double
BList* fGs; // double
BList* fConstraints;
BList* fObjFunctionSummands;
public:
friend class LinearSpec;
};
} // namespace LinearProgramming
using LinearProgramming::PenaltyFunction;
#endif // PENALTY_FUNCTION_H