haiku/headers/libs/linprog/PenaltyFunction.h
Ingo Weinhold 0306945545 Patch by Christof Lutteroth:
* 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
2008-02-25 01:54:05 +00:00

50 lines
907 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