Commit 0d81b9e1 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

renaming

parent 1706b108
......@@ -203,7 +203,7 @@ public:
}
void Update(const SampleSolution &fineSolution, const SampleSolution &coarseSolution) {
double newC = fineSolution.Cost;
double newC = fineSolution.C;
double newQ = fineSolution.Q;
double newY = fineSolution.Q - coarseSolution.Q;
Update(newC, newQ, newY);
......
......@@ -46,7 +46,7 @@ struct SampleSolution {
public:
double Q;
double Cost;
double C;
Vector U;
......@@ -78,7 +78,7 @@ public:
void Init() {
Q = 0.0;
Cost = 0.0;
C = 0.0;
U = 0.0;
}
};
......
......@@ -23,7 +23,7 @@ void EllipticPDESolver::computeQ(SampleSolution &solution) {
}
void EllipticPDESolver::computeCost(SampleSolution &solution) {
if (costMeasure == "size") solution.Cost = solution.U.size();
if (costMeasure == "size") solution.C = solution.U.size();
// else if (costMeasure == "time") solution.Cost = solution.U.size(); // Todo
else Exit("Cost measure not implemented")
}
......
......@@ -62,7 +62,7 @@ public:
plotSolution(solution);
weightSolution(solution);
// Todo other idea: Add weight as class member of solution
vout(2) << "Q=" << solution.Q << " cost=" << solution.Cost << endl;
vout(2) << "Q=" << solution.Q << " cost=" << solution.C << endl;
mout.EndBlock(verbose <= 1);
}
......@@ -90,7 +90,7 @@ protected:
}
void computeCost(SampleSolution &solution) override {
if (costMeasure == "size") solution.Cost = solution.U.size();
if (costMeasure == "size") solution.C = solution.U.size();
// else if (costMeasure == "time") solution.Cost = solution.U.size(); // Todo
else Exit("Cost measure not implemented")
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment