Commit 9793ff71 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

refactored SampleID and introduced SampleSolution

parent 6fcedb17
#ifndef SAMPLEID_HPP
#define SAMPLEID_HPP
#include "Algebra.h"
#include <string>
struct SampleID {
int level = -1;
int m = -1;
bool coarse = false;
SampleID() = default;
SampleID(int level, int m, int coarse) :
level(level), m(m), coarse(coarse) {}
int level;
int number;
bool coarse;
std::string Str() const {
return "l:" + std::to_string(level) +
"-m:" + std::to_string(m) +
"-m:" + std::to_string(number) +
"-c:" + std::to_string((int) coarse);
}
};
struct SampleSolution {
SampleID id;
int mGraphLevel;
double Q;
double Cost;
Vector U;
SampleSolution(MatrixGraphs &solMGraphs, int mGraphLevel) :
U(Vector(solMGraphs[mGraphLevel])) {
Init();
}
void Init() {
Q = 0.0;
Cost = 0.0;
U = 0.0;
}
};
#endif //SAMPLEID_HPP
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