-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Travel time weight #268
Travel time weight #268
Conversation
} | ||
double streetTime(const Graph* graph, Id node1, Id node2) { | ||
const auto street{graph->street(node1, node2)}; | ||
const auto length{(*street)->length()}; |
Check warning
Code scanning / Cppcheck (reported by Codacy)
Local variable 'speed' shadows outer function Warning
GIVEN( | ||
"A dynamics objects, many streets and an itinerary with bifurcations (TIME " | ||
"WEIGHTED)") { | ||
Street s1{0, std::make_pair(0, 1), 5., 50.}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note test
"A dynamics objects, many streets and an itinerary with bifurcations (TIME " | ||
"WEIGHTED)") { | ||
Street s1{0, std::make_pair(0, 1), 5., 50.}; | ||
Street s2{1, std::make_pair(1, 2), 7., 70.}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note test
"WEIGHTED)") { | ||
Street s1{0, std::make_pair(0, 1), 5., 50.}; | ||
Street s2{1, std::make_pair(1, 2), 7., 70.}; | ||
Street s3{2, std::make_pair(0, 3), 9., 90.}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note test
Street s1{0, std::make_pair(0, 1), 5., 50.}; | ||
Street s2{1, std::make_pair(1, 2), 7., 70.}; | ||
Street s3{2, std::make_pair(0, 3), 9., 90.}; | ||
Street s4{3, std::make_pair(3, 2), 10., 100.}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note test
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #268 +/- ##
==========================================
+ Coverage 90.71% 90.90% +0.18%
==========================================
Files 35 35
Lines 4976 5011 +35
Branches 459 462 +3
==========================================
+ Hits 4514 4555 +41
+ Misses 462 456 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -132,17 +134,17 @@ | |||
auto const& row{m_graph.adjMatrix().getRow(nodeId)}; | |||
for (const auto nextNodeId : row) { | |||
if (nextNodeId == destinationID) { | |||
if (std::abs(m_graph.street(nodeId * dimension + nextNodeId)->length() - | |||
minDistance) < 1.) // 1 meter tolerance between shortest paths | |||
if (std::abs(m_weightFunction(&m_graph, nodeId, nextNodeId) - minDistance) < |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 10.4 rule Note
distance - minDistance) < | ||
1.}; // 1 meter tolerance between shortest paths | ||
std::abs(m_weightFunction(&m_graph, nodeId, nextNodeId) + distance - | ||
minDistance) < |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 10.4 rule Note
No description provided.