Skip to content
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

Added reverseDirectedGraph() function #320

Merged
merged 4 commits into from
Jun 12, 2023
Merged

Conversation

Grufoony
Copy link
Contributor

Added reverseDirectedGraph() function (#315) to reverse all connection in a directed graph and related tests.

@github-actions github-actions bot added core something about core test Something about test labels Jun 10, 2023
@ghost
Copy link

ghost commented Jun 10, 2023

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

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@sbaldu sbaldu requested review from sbaldu and ZigRazor June 10, 2023 09:37
if (!isDirectedGraph()) {
throw std::runtime_error(ERR_UNDIR_GRAPH);
}
auto edgeSet = Graph<T>::getEdgeSet();

Check warning

Code scanning / Cppcheck (reported by Codacy)

Local variable 'edgeSet' shadows outer variable Warning

Local variable 'edgeSet' shadows outer variable
* This function reverse the direction of the edges in a directed graph
*
*/
virtual void reverseDirectedGraph();

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 802 with no text in the supplied rule-texts-file Warning

misra violation 802 with no text in the supplied rule-texts-file
@codecov
Copy link

codecov bot commented Jun 10, 2023

Codecov Report

Merging #320 (43f38e4) into master (d862cb0) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #320      +/-   ##
==========================================
- Coverage   97.24%   97.23%   -0.01%     
==========================================
  Files          54       54              
  Lines        7793     7850      +57     
==========================================
+ Hits         7578     7633      +55     
- Misses        215      217       +2     
Flag Coverage Δ
unittests 97.23% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
include/Graph/Graph.hpp 94.96% <100.00%> (+0.03%) ⬆️
test/GraphTest.cpp 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@sbaldu
Copy link
Collaborator

sbaldu commented Jun 10, 2023

Can you fix the warnings by Code Scanning?

@sbaldu
Copy link
Collaborator

sbaldu commented Jun 11, 2023

Merge LGTM

Copy link
Collaborator

@nrkramer nrkramer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing this! Looks great.

@ZigRazor ZigRazor linked an issue Jun 12, 2023 that may be closed by this pull request
@ZigRazor ZigRazor merged commit 9356afe into ZigRazor:master Jun 12, 2023
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core something about core test Something about test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add function for reversing directed graphs
4 participants