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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user