Simplify code and clean up.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38738 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2010-09-20 04:52:30 +00:00
parent b329767e2f
commit 43b24b87de
5 changed files with 20 additions and 30 deletions
+10 -12
View File
@@ -3,7 +3,6 @@
* Copyright 2007-2008, James Kim, [email protected]
* Distributed under the terms of the MIT License.
*/
#ifndef SUMMAND_H
#define SUMMAND_H
@@ -17,20 +16,19 @@ class Variable;
* A summand of a linear term.
*/
class Summand {
public:
double Coeff();
void SetCoeff(double coeff);
Variable* Var();
void SetVar(Variable* var);
Summand(double coeff, Variable* var);
~Summand();
Summand(double coeff, Variable* var);
~Summand();
double Coeff();
void SetCoeff(double coeff);
Variable* Var();
void SetVar(Variable* var);
private:
double fCoeff;
Variable* fVar;
bool fUsedInPenaltyFunction; //not set yet
double fCoeff;
Variable* fVar;
bool fUsedInPenaltyFunction; //not set yet
};
} // namespace LinearProgramming
+2 -2
View File
@@ -7,7 +7,7 @@
#define VARIABLE_H
#include <File.h>
#include <List.h>
#include <ObjectList.h>
#include <String.h>
#include <SupportDefs.h>
@@ -60,7 +60,7 @@ protected:
private:
LinearSpec* fLS;
BList* fUsingSummands;
BObjectList<Summand> fUsingSummands;
// All Summands that link to this Variable
double fValue;
double fMin;