JuliaApproximation / DomainSets.jl

A Julia package for describing domains as continuous sets of elements
MIT License
72 stars 12 forks source link

reduce usage of 'issubset' #103

Closed daanhb closed 2 years ago

daanhb commented 2 years ago

issubset was being used in optimizations involving uniondomain and intersectdomain, to check for cases where the union or intersection need not be formed. But this assumes that issubset is defined, which is very often not the case.

In this pull request, the fallback only uses issubset when the arguments of uniondomain or intersectdomain involve at least one subtype of Domain. Even this we may need to relax later on, but for now it improves interoperability with other (non-Domain) types.

codecov[bot] commented 2 years ago

Codecov Report

Merging #103 (2d62ac3) into master (bec9383) will increase coverage by 0.38%. The diff coverage is 91.30%.

:exclamation: Current head 2d62ac3 differs from pull request most recent head 9d40433. Consider uploading reports for the commit 9d40433 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #103      +/-   ##
==========================================
+ Coverage   85.29%   85.67%   +0.38%     
==========================================
  Files          31       31              
  Lines        2428     2444      +16     
==========================================
+ Hits         2071     2094      +23     
+ Misses        357      350       -7     
Impacted Files Coverage Δ
src/generic/setoperations.jl 92.63% <86.66%> (+5.05%) :arrow_up:
src/domains/interval.jl 94.56% <100.00%> (+0.15%) :arrow_up:
src/domains/point.jl 100.00% <100.00%> (ø)
src/generic/productdomain.jl 94.05% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bec9383...9d40433. Read the comment docs.