Commit cb090889 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

added constructors, might still need refactoring

parent 21d49ed5
......@@ -14,6 +14,11 @@ struct SampleID {
bool coarse;
SampleID() {}
SampleID(Level level, int number, bool coarse) :
level(level), number(number), coarse(coarse) {}
std::string Str() const {
return "l:" + std::to_string(level.fine) +
"-m:" + std::to_string(number) +
......@@ -35,6 +40,12 @@ struct SampleSolution {
Init();
}
// Todo might crash if sampleID corresponds to coarse sample
SampleSolution(MatrixGraphs &solMGraphs, SampleID id) :
id(id), U(Vector(solMGraphs[id.level.mGfine])) {
Init();
}
void Init() {
Q = 0.0;
Cost = 0.0;
......
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