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

[Port] fix induced_subgraph indexing with vector of Bools #22

Merged
merged 2 commits into from
Jan 9, 2022

Conversation

etiennedeg
Copy link
Member

This is a port of #1573

@codecov
Copy link

codecov bot commented Nov 7, 2021

Codecov Report

Merging #22 (8bbf1c5) into master (c5844a1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #22   +/-   ##
=======================================
  Coverage   99.46%   99.46%           
=======================================
  Files         107      107           
  Lines        5622     5625    +3     
=======================================
+ Hits         5592     5595    +3     
  Misses         30       30           

Currently both `getindex` and `induced_subgraph` handle `AbstractVector{Bool}` argument in a way inconsistent with Julia Base rules.
Copy link
Contributor

@simonschoelly simonschoelly left a comment

Choose a reason for hiding this comment

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

I am merging this now. This PR would probably create some issues with graphs that use Bool as eltype, but then such a graph does not really make sense anyway.

Another thing that could go wrong has to do with the method signature, as it is if of the form

induced_subgraph(g::AbstractGraph, vlist::AbstractVector{Bool})

so I guess it could lead to some issues with some downstream packages that implement

induced_subgraph(g::SomeSpecificGraph, vlist)

but I think in such a case, we could just try to figure out a better method signature later.

@simonschoelly simonschoelly merged commit 9bb747f into JuliaGraphs:master Jan 9, 2022
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.

3 participants