mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 12:38:51 +01:00
Remove unused variable and add copy constructor.
This commit is contained in:
parent
cf5eb5dda1
commit
18e5da6297
@ -19,6 +19,7 @@ class Variable;
|
||||
*/
|
||||
class Summand {
|
||||
public:
|
||||
Summand(Summand* summand);
|
||||
Summand(double coeff, Variable* var);
|
||||
~Summand();
|
||||
|
||||
@ -31,7 +32,6 @@ public:
|
||||
private:
|
||||
double fCoeff;
|
||||
Variable* fVar;
|
||||
bool fUsedInPenaltyFunction; //not set yet
|
||||
};
|
||||
|
||||
typedef BObjectList<Summand> SummandList;
|
||||
|
@ -9,6 +9,28 @@
|
||||
#include "Variable.h"
|
||||
|
||||
|
||||
Summand::Summand(Summand* summand)
|
||||
:
|
||||
fCoeff(summand->Coeff()),
|
||||
fVar(summand->Var())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Summand::Summand(double coeff, Variable* var)
|
||||
:
|
||||
fCoeff(coeff),
|
||||
fVar(var)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Summand::~Summand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the summmand's coefficient.
|
||||
*
|
||||
@ -62,23 +84,3 @@ Summand::VariableIndex()
|
||||
{
|
||||
return fVar->Index();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
Summand::~Summand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
Summand::Summand(double coeff, Variable* var)
|
||||
{
|
||||
fCoeff = coeff;
|
||||
fVar = var;
|
||||
fUsedInPenaltyFunction = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user