|
34 | 34 | DecoratedInterval(I::DecoratedInterval, dec::DECORATION) = DecoratedInterval(I.interval, dec)
|
35 | 35 |
|
36 | 36 | function DecoratedInterval(a::T, b::S, d::DECORATION) where {T<:Real, S<:Real}
|
37 |
| - BoundsType = promote_type(default_bound(), T, S) |
38 |
| - is_valid_interval(a, b) || return DecoratedInterval(Interval{BoundsType}(a, b), ill) |
39 |
| - return DecoratedInterval(Interval{BoundsType}(a, b), d) |
40 |
| -end |
41 |
| -function DecoratedInterval(a::T, b::S, d::DECORATION) where {T<:AbstractFloat, S<:Real} |
42 |
| - BoundsType = promote_type(T, S) |
43 |
| - is_valid_interval(a, b) || return DecoratedInterval(Interval{BoundsType}(a, b), ill) |
44 |
| - return DecoratedInterval(Interval{BoundsType}(a, b), d) |
45 |
| -end |
46 |
| -function DecoratedInterval(a::T, b::S, d::DECORATION) where {T<:Real, S<:AbstractFloat} |
47 |
| - BoundsType = promote_type(T, S) |
48 |
| - is_valid_interval(a, b) || return DecoratedInterval(Interval{BoundsType}(a, b), ill) |
49 |
| - return DecoratedInterval(Interval{BoundsType}(a, b), d) |
50 |
| -end |
51 |
| -function DecoratedInterval(a::T, b::S, d::DECORATION) where {T<:AbstractFloat, S<:AbstractFloat} |
52 |
| - BoundsType = promote_type(T, S) |
| 37 | + BoundsType = boundstype(T, S) |
53 | 38 | is_valid_interval(a, b) || return DecoratedInterval(Interval{BoundsType}(a, b), ill)
|
54 | 39 | return DecoratedInterval(Interval{BoundsType}(a, b), d)
|
55 | 40 | end
|
|
67 | 52 | DecoratedInterval(I::Interval) = DecoratedInterval{default_bound()}(I)
|
68 | 53 |
|
69 | 54 | function DecoratedInterval(a::T, b::S) where {T<:Real, S<:Real}
|
70 |
| - BoundsType = promote_type(default_bound(), T, S) |
71 |
| - is_valid_interval(a, b) || return DecoratedInterval(Interval{BoundsType}(a, b), ill) |
72 |
| - return DecoratedInterval(Interval{BoundsType}(a, b)) |
73 |
| -end |
74 |
| -function DecoratedInterval(a::T, b::S) where {T<:AbstractFloat, S<:Real} |
75 |
| - BoundsType = promote_type(T, S) |
76 |
| - is_valid_interval(a, b) || return DecoratedInterval(Interval{BoundsType}(a, b), ill) |
77 |
| - return DecoratedInterval(Interval{BoundsType}(a, b)) |
78 |
| -end |
79 |
| -function DecoratedInterval(a::T, b::S) where {T<:Real, S<:AbstractFloat} |
80 |
| - BoundsType = promote_type(T, S) |
81 |
| - is_valid_interval(a, b) || return DecoratedInterval(Interval{BoundsType}(a, b), ill) |
82 |
| - return DecoratedInterval(Interval{BoundsType}(a, b)) |
83 |
| -end |
84 |
| -function DecoratedInterval(a::T, b::S) where {T<:AbstractFloat, S<:AbstractFloat} |
85 |
| - BoundsType = promote_type(T, S) |
| 55 | + BoundsType = boundstype(T, S) |
86 | 56 | is_valid_interval(a, b) || return DecoratedInterval(Interval{BoundsType}(a, b), ill)
|
87 | 57 | return DecoratedInterval(Interval{BoundsType}(a, b))
|
88 | 58 | end
|
|
0 commit comments