Skip to content
Snippets Groups Projects
Commit 53bc643b authored by Mark Winter's avatar Mark Winter
Browse files

Made code multitemporal

parent b5be2490
Branches
No related tags found
No related merge requests found
......@@ -73,7 +73,10 @@ double getCost(threadDB* thread_db, const CSourcePath* path)
// TODO: This cost function makes our DFS nearly pointless!!!
int srcIdx = path->src_index();
double totalCost = 3*calcFullCellDist(thread_db, path->indices[srcIdx], path->indices[srcIdx+1]);
double totalCost = 0.0;
for ( int idx = path->startIdx; idx < path->endIdx-1; ++idx )
totalCost += calcFullCellDist(thread_db, path->indices[idx], path->indices[idx +1]);
if (totalCost == dbltype::infinity() )
return dbltype::infinity();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment