diff --git a/src/common.jl b/src/common.jl index 62e4ceb..4ce5b39 100644 --- a/src/common.jl +++ b/src/common.jl @@ -19,7 +19,7 @@ struct EmptyDomain <: AbstractDomain end """ domain() -Construct an [`EmptyDomain`](@ref). +Construct an `EmptyDomain`. """ domain() = EmptyDomain() diff --git a/src/continuous.jl b/src/continuous.jl index 72ff02d..9a349de 100644 --- a/src/continuous.jl +++ b/src/continuous.jl @@ -16,12 +16,6 @@ end domain(a::Tuple{T, Bool}, b::Tuple{T, Bool}) where {T <: Real} domain(intervals::Vector{Tuple{Tuple{T, Bool},Tuple{T, Bool}}}) where {T <: Real} Construct a domain of continuous interval(s). -```julia -d1 = domain((0., true), (1., false)) # d1 = [0, 1) -d2 = domain([ # d2 = [0, 1) ∪ (3.5, 42] - (0., true), (1., false), - (3.5, false), (42., true), -]) """ function domain(intervals::Vector{Interval{T,L,R}}) where {T<:Real,L,R} return Intervals(map(i -> Interval(i), intervals)) @@ -102,14 +96,6 @@ Compute the intersections of a domain with an interval and store the results in - `is::IS`: a collection of intervals. - `i::I`: an interval. - `new_itvls::Vector{I}`: a vector to store the results. - -## Examples -```julia -is = domain([Interval(0, 1), Interval(3.5, 42)]) -i = Interval(0.5, 1.5) -new_itvls = Vector{Interval}() -intersect_domains!(is, i, new_itvls) -``` """ function intersect_domains!(is::IS, i::I, new_itvls) where {IS<:Intervals,I<:Interval} for interval in get_domain(is) diff --git a/src/discrete.jl b/src/discrete.jl index e586487..dcd3488 100644 --- a/src/discrete.jl +++ b/src/discrete.jl @@ -15,7 +15,7 @@ SetDomain(values) = SetDomain(Set(values)) """ RangeDomain -A discrete domain defined by a `range <: AbstractRange{Real}`. As ranges are immutable in Julia, changes in `RangeDomain` must use [`set_domain!`](@ref). +A discrete domain defined by a `range <: AbstractRange{Real}`. As ranges are immutable in Julia, changes in `RangeDomain` must use `set_domain!`. """ struct RangeDomain{T<:Real,R<:AbstractRange{T}} <: DiscreteDomain{T} domain::R @@ -31,7 +31,7 @@ ArbitraryDomain(elements) = ArbitraryDomain(Set(elements)) """ domain(values) domain(range::R) where {T <: Real, R <: AbstractRange{T}} -Construct either a [`SetDomain`](@ref) or a [RangeDomain](@ref). +Construct either a `SetDomain` or a `RangeDomain``. ```julia d1 = domain(1:5) d2 = domain([53.69, 89.2, 0.12])