Skip to content

Commit

Permalink
rename approximate function
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Jul 18, 2020
1 parent 4dee6a2 commit 9701a73
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/src/lib/approximations.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ new_approx(S::LazySet, p1::VN, d1::VN,
addapproximation!(Ω::PolygonalOverapproximation, p1::VN, d1::VN, p2::VN, d2::VN) where {N<:Real, VN<:AbstractVector{N}}
refine(::LocalApproximation, ::LazySet)
tohrep(::PolygonalOverapproximation)
approximate(S::LazySet{N}, ε::N) where {N<:AbstractFloat}
_approximate(S::LazySet{N}, ε::N) where {N<:AbstractFloat}
constraint(::LocalApproximation)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/man/iterative_refinement.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ point epsilon in the given numerical precision.
## Algorithm

Having presented the individual steps, we give the pseudocode of the iterative
refinement algorithm, see `approximate(S, ε)`.
refinement algorithm, see `_approximate(S, ε)`.

The algorithm consists of the following steps:

Expand Down
4 changes: 2 additions & 2 deletions src/Approximations/iterative_refinement.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function tohrep(Ω::PolygonalOverapproximation)
end

"""
approximate(S::LazySet{N}, ε::N) where {N<:AbstractFloat}
_approximate(S::LazySet{N}, ε::N) where {N<:AbstractFloat}
Return an ε-close approximation of the given 2D convex set (in terms of
Hausdorff distance) as an inner and an outer approximation composed by sorted
Expand All @@ -199,7 +199,7 @@ local `Approximation2D`.
An ε-close approximation of the given 2D convex set.
"""
function approximate(S::LazySet{N}, ε::N) where {N<:AbstractFloat}
function _approximate(S::LazySet{N}, ε::N) where {N<:AbstractFloat}
# initialize box directions
pe = σ(DIR_EAST(N), S)
pn = σ(DIR_NORTH(N), S)
Expand Down
2 changes: 1 addition & 1 deletion src/Approximations/overapproximate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function overapproximate(S::ST,
constraints[4] = LinearConstraint(DIR_SOUTH(N), ρ(DIR_SOUTH(N), S))
return HPolygon(constraints, sort_constraints=false)
else
return tohrep(approximate(S, ε))
return tohrep(_approximate(S, ε))
end
end

Expand Down

0 comments on commit 9701a73

Please sign in to comment.