mirror of
https://review.haiku-os.org/haiku
synced 2025-02-08 14:49:58 +01:00
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
44 lines
715 B
C++
44 lines
715 B
C++
#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
|