Closed daanhb closed 2 years ago
Merging #95 (26e5a16) into master (6b7983d) will increase coverage by
0.14%
. The diff coverage is96.66%
.
@@ Coverage Diff @@
## master #95 +/- ##
==========================================
+ Coverage 84.79% 84.94% +0.14%
==========================================
Files 30 31 +1
Lines 2387 2417 +30
==========================================
+ Hits 2024 2053 +29
- Misses 363 364 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/DomainSets.jl | 100.00% <ø> (ø) |
|
src/generic/canonical.jl | 69.76% <ø> (ø) |
|
src/generic/domain.jl | 91.80% <ø> (ø) |
|
src/domains/numbers.jl | 93.75% <93.75%> (ø) |
|
src/domains/trivial.jl | 94.36% <100.00%> (+1.38%) |
:arrow_up: |
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 6b7983d...26e5a16. Read the comment docs.
Why remove them when implementing is very straightforward?
Did you have an implementation in mind? I was thinking we could make a strict "StrictFullSpace{T}" (or something with a better name) which contains x
if x
is of type T
, or if convert(T, x)
works. That might be useful elsewhere too.
It's like a TypeDomain
, the domain of all instances of a certain type
Why not:
struct Integers end
in(x, ::Integers) = isinteger(x)
I've done both, more strict full spaces called TypeDomain
and specific number sets like Integers
. The isinteger
function seems indeed most appropriate to define the set of integers. The isreal
function allows real arrays (intentionally), so I had to exclude those for the set of real numbers. It's a pity there are no generic functions isnumber
, iscomplex
and isrational
.
Anyway:
julia> π ∈ ℤ
false
94