- Hide constraint header in Area file.

- Start to replace BList with BObjectList.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38741 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2010-09-20 06:09:19 +00:00
parent 0401a9c712
commit 601eded950
9 changed files with 71 additions and 54 deletions
+12 -7
View File
@@ -9,7 +9,7 @@
#include <math.h>
#include <File.h>
#include <List.h>
#include <ObjectList.h>
#include <String.h>
#include <SupportDefs.h>
@@ -31,8 +31,8 @@ class Constraint {
public:
int32 Index() const;
BList* LeftSide();
void SetLeftSide(BList* summands);
SummandList* LeftSide();
void SetLeftSide(SummandList* summands);
void UpdateLeftSide();
void SetLeftSide(double coeff1, Variable* var1);
void SetLeftSide(double coeff1, Variable* var1,
@@ -71,13 +71,14 @@ public:
~Constraint();
protected:
Constraint(LinearSpec* ls, BList* summands,
OperatorType op, double rightSide,
double penaltyNeg, double penaltyPos);
Constraint(LinearSpec* ls,
SummandList* summands, OperatorType op,
double rightSide, double penaltyNeg,
double penaltyPos);
private:
LinearSpec* fLS;
BList* fLeftSide;
SummandList* fLeftSide;
OperatorType fOp;
double fRightSide;
Summand* fDNegObjSummand;
@@ -91,6 +92,10 @@ public:
};
typedef BObjectList<Constraint> ConstraintList;
} // namespace LinearProgramming
using LinearProgramming::Constraint;
+5 -5
View File
@@ -43,7 +43,7 @@ public:
Variable* AddVariable();
Constraint* AddConstraint(BList* summands,
Constraint* AddConstraint(SummandList* summands,
OperatorType op, double rightSide);
Constraint* AddConstraint(double coeff1, Variable* var1,
OperatorType op, double rightSide);
@@ -60,7 +60,7 @@ public:
double coeff4, Variable* var4,
OperatorType op, double rightSide);
Constraint* AddConstraint(BList* summands,
Constraint* AddConstraint(SummandList* summands,
OperatorType op, double rightSide,
double penaltyNeg, double penaltyPos);
Constraint* AddConstraint(double coeff1, Variable* var1,
@@ -85,8 +85,8 @@ public:
PenaltyFunction* AddPenaltyFunction(Variable* var, BList* xs,
BList* gs);
BList* ObjFunction();
void SetObjFunction(BList* summands);
SummandList* ObjFunction();
void SetObjFunction(SummandList* summands);
void UpdateObjFunction();
ResultType Presolve();
@@ -115,7 +115,7 @@ private:
lprec* fLpPresolved;
OptimizationType fOptimization;
lprec* fLP;
BList* fObjFunction;
SummandList* fObjFunction;
BList fVariables;
BList fConstraints;
ResultType fResult;
+6
View File
@@ -6,6 +6,8 @@
#ifndef SUMMAND_H
#define SUMMAND_H
#include <ObjectList.h>
namespace LinearProgramming {
@@ -31,9 +33,13 @@ private:
bool fUsedInPenaltyFunction; //not set yet
};
typedef BObjectList<Summand> SummandList;
} // namespace LinearProgramming
using LinearProgramming::Summand;
using LinearProgramming::SummandList;
#endif // OBJ_FUNCTION_SUMMAND_H