Edited computeDIstance function for comparing simulation results in order to work with generic containers
This commit is contained in:
parent
6762c266c0
commit
382ef273a4
|
|
@ -755,10 +755,15 @@ struct SimulationResults
|
||||||
this->pJob = pJob;
|
this->pJob = pJob;
|
||||||
load(loadFromPath);
|
load(loadFromPath);
|
||||||
}
|
}
|
||||||
static double computeDistance(
|
|
||||||
const SimulationResults &resultsA,
|
template<
|
||||||
|
typename Container,
|
||||||
|
typename T = std::decay_t<decltype(*begin(std::declval<Container>()))>,
|
||||||
|
typename = std::enable_if_t<std::is_convertible_v<T, std::pair<VertexIndex, VertexIndex>>>>
|
||||||
|
static double computeDistance(const SimulationResults &resultsA,
|
||||||
const SimulationResults &resultsB,
|
const SimulationResults &resultsB,
|
||||||
const std::unordered_map<VertexIndex, VertexIndex> &resultsAToResultsBViMap)
|
const Container &resultsAToResultsBViMap
|
||||||
|
/*,const std::unordered_map<VertexIndex, VertexIndex> */)
|
||||||
{
|
{
|
||||||
double distance = 0;
|
double distance = 0;
|
||||||
for (std::pair<int, int> resultsAToResultsBViPair : resultsAToResultsBViMap) {
|
for (std::pair<int, int> resultsAToResultsBViPair : resultsAToResultsBViMap) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue