Changed qualityVector from map to vector of pairs
This change is better for the dispatcher, as he can sort the qualityvector now easily by the quality of each part
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
#ifndef SOURCE_ABSTRAKTIONLAYER_BASE_H
|
||||
#define SOURCE_ABSTRAKTIONLAYER_BASE_H
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "../../header/input.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef map<Part*, float> qualityVector;
|
||||
typedef vector<pair<float, Part*>> qualityVector;
|
||||
|
||||
/*
|
||||
* Die Logik mit der Template-Basisklasse und den abgeleiteten Layern kam mit der Idee, dass die Layer
|
||||
|
@ -46,7 +46,7 @@ bool AbstractionLayer_1::EvaluateQuality (const coor constraintCoordinate, quali
|
||||
{
|
||||
for(auto it = qVector.begin(); it != qVector.end(); it++)
|
||||
{
|
||||
if(PlaceOfPartGood(constraintCoordinate, it->first->m_a1.m_connections))
|
||||
if(PlaceOfPartGood(constraintCoordinate, it->second->m_a1.m_connections))
|
||||
continue;
|
||||
qVector.erase(it++);
|
||||
}
|
||||
|
Reference in New Issue
Block a user