Commit 8b8457a4 authored by Colby Green's avatar Colby Green
Browse files

permLength - 1

parent 59487365
......@@ -49,8 +49,9 @@ public:
double minDistance = numeric_limits<double>::infinity();
size_t minIndex = numeric_limits<size_t>::infinity();
for (size_t i = 0; i < v.size(); i++){
if (!v[i].visited && v[i].minDistanceTo < minDistance){
minDistance = v[i].minDistanceTo;
Vertex &vertex = v[i];
if (!vertex.visited && vertex.minDistanceTo < minDistance){
minDistance = vertex.minDistanceTo;
minIndex = i;
}
}
......@@ -100,7 +101,7 @@ public:
if ((path.size() - permLength) <= 5){
return true;
}
auto first = path.begin() + int(permLength);
auto first = path.begin() + int(permLength - 1);
auto last = path.end();
vector<int> newVec(first, last);
mst2 mst(newVec, pokeDex, distanceMatrix);
......
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