@@ -41,6 +41,8 @@ isequal_interval(x) = Base.Fix2(isequal_interval, x)
41
41
Test whether `x` is contained in `y`.
42
42
43
43
Implement the `subset` function of the IEEE Standard 1788-2015 (Table 9.3).
44
+
45
+ See also: [`isstrictsubset`](@ref) and [`isinterior`](@ref).
44
46
"""
45
47
issubset_interval (x:: BareInterval , y:: BareInterval ) = (inf (y) ≤ inf (x)) & (sup (x) ≤ sup (y))
46
48
@@ -64,16 +66,15 @@ issubset_interval(x, y, z, w...) = issubset_interval(x, y) & issubset_interval(y
64
66
"""
65
67
isstrictsubset(x, y)
66
68
67
- Test whether `x` is a strict subset of `y`. If `x` and `y` are intervals, this
68
- is semantically equivalent to `isinterior(x, y)`. If `x` and `y` are vectors,
69
- `x` must be a subset of `y` with at least one of their component being a strict
70
- subset.
69
+ Test whether `x` is a subset of, but not equal to, `y`. If `x` and `y` are
70
+ vectors, `x` must be a subset of `y` with at least one of their component being
71
+ a strict subset.
71
72
72
- See also: [`isinterior`](@ref).
73
+ See also: [`issubset_interval`](@ref) and [` isinterior`](@ref).
73
74
"""
74
- isstrictsubset (x:: BareInterval , y:: BareInterval ) = isinterior (x, y)
75
+ isstrictsubset (x:: BareInterval , y:: BareInterval ) = issubset_interval (x, y) & ! isequal_interval (x, y)
75
76
76
- isstrictsubset (x:: Interval , y:: Interval ) = isinterior (x, y)
77
+ isstrictsubset (x:: Interval , y:: Interval ) = issubset_interval (x, y) & ! isequal_interval (x, y)
77
78
isstrictsubset (x:: Complex{<:Interval} , y:: Complex{<:Interval} ) =
78
79
(isstrictsubset (real (x), real (y)) & issubset_interval (imag (x), imag (y))) | (issubset_interval (real (x), real (y)) & isstrictsubset (imag (x), imag (y)))
79
80
isstrictsubset (x:: Complex{<:Interval} , y:: Interval ) = isstrictsubset (real (x), y) & isthinzero (imag (x))
@@ -83,15 +84,16 @@ isstrictsubset(x::AbstractVector, y::AbstractVector) = issubset_interval(x, y) &
83
84
84
85
isstrictsubset (x, y, z, w... ) = isstrictsubset (x, y) & isstrictsubset (y, z, w... )
85
86
87
+ isstrictsubset (x) = Base. Fix2 (isstrictsubset, x)
88
+
86
89
"""
87
90
isinterior(x, y)
88
91
89
- Test whether `x` is in the interior of `y`. If `x` and `y` are intervals, this
90
- is semantically equivalent to `isstrictsubset(x, y)`.
92
+ Test whether `x` is in the interior of `y`.
91
93
92
94
Implement the `interior` function of the IEEE Standard 1788-2015 (Table 9.3).
93
95
94
- See also: [`isstrictsubset`](@ref).
96
+ See also: [`issubset_interval`](@ref) and [` isstrictsubset`](@ref).
95
97
"""
96
98
isinterior (x:: BareInterval , y:: BareInterval ) =
97
99
_strictlessprime (inf (y), inf (x)) & _strictlessprime (sup (x), sup (y))
0 commit comments