Skip to content

Conversation

@ErikDervishi03
Copy link
Contributor

-this is a pull request for issues #378
this code fix the issue:

if (edge->isDirected() == false) {
  auto reverseKey =
      std::make_pair(elem.second->getUserId(), elem.first->getUserId());
  pairwise_dist[reverseKey] = edgeWeight;
}

this block of code is ensuring that for undirected edges, the pairwise distance map contains entries for both directions in order to have the symmetry of the edges in an undirected graph.
-now all the test works:

[----------] Global test environment tear-down
[==========] 274 tests from 38 test suites ran. (746 ms total)
[  PASSED  ] 274 tests.

@ghost
Copy link

ghost commented Dec 18, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@codecov
Copy link

codecov bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (da9c725) 97.52% compared to head (c1994b0) 97.52%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #380   +/-   ##
=======================================
  Coverage   97.52%   97.52%           
=======================================
  Files          55       55           
  Lines        9259     9268    +9     
=======================================
+ Hits         9030     9039    +9     
  Misses        229      229           
Flag Coverage Δ
unittests 97.52% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ZigRazor ZigRazor linked an issue Dec 19, 2023 that may be closed by this pull request
@ZigRazor ZigRazor merged commit 2c3ccb4 into ZigRazor:master Dec 19, 2023
@ErikDervishi03 ErikDervishi03 deleted the fix_floyd_warshall_bug branch December 20, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug on a floyd warshall test

2 participants