Skip to content

Commit

Permalink
Merge pull request #3616 from JuliaReach/schillic/_vertices_list
Browse files Browse the repository at this point in the history
Remove redundant `_vertices_list` methods
  • Loading branch information
schillic authored Jul 26, 2024
2 parents 662b477 + a50b5d2 commit 257b400
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
5 changes: 0 additions & 5 deletions src/Interfaces/AbstractPolytope.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ function _linear_map_hrep_helper(M::AbstractMatrix, P::AbstractPolytope,
end
end

# the "backend" argument is ignored, used for dispatch
function _vertices_list(P::AbstractPolytope, backend)
return vertices_list(P)
end

"""
volume(P::AbstractPolytope; backend=default_polyhedra_backend(P))
Expand Down
2 changes: 1 addition & 1 deletion src/Sets/HPolytope/HPolytopeModule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using ReachabilityBase.Require: require

@reexport import ..API: isbounded, isoperationtype, rand, vertices_list,
minkowski_sum
import ..LazySets: _linear_map_hrep_helper, _vertices_list
import ..LazySets: _linear_map_hrep_helper
import Base: convert
@reexport using ..API

Expand Down
4 changes: 0 additions & 4 deletions src/Sets/HPolytope/vertices_list.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,3 @@ function vertices_list(P::HPolytope; backend=nothing, prune::Bool=true)
end
return collect(Polyhedra.points(Q))
end

function _vertices_list(P::HPolytope, backend)
return vertices_list(P; backend=backend)
end
2 changes: 1 addition & 1 deletion src/Sets/VPolytope/VPolytopeModule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using Reexport, Requires
using ..LazySets: AbstractPolytope, LazySet, LinearMapVRep, default_lp_solver,
default_lp_solver_polyhedra, default_polyhedra_backend,
is_lp_infeasible, is_lp_optimal, linprog,
_minkowski_sum_vrep_nd, _vertices_list
_minkowski_sum_vrep_nd
using LinearAlgebra: dot
using Random: AbstractRNG, GLOBAL_RNG
using ReachabilityBase.Arrays: projection_matrix
Expand Down
4 changes: 2 additions & 2 deletions src/Sets/VPolytope/minkowski_sum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ function minkowski_sum(P1::VPolytope, P2::VPolytope;
@assert dim(P1) == dim(P2) "cannot compute the Minkowski sum of two " *
"polytopes of dimension $(dim(P1)) and $(dim(P2)), respectively"

vlist1 = _vertices_list(P1, backend)
vlist2 = _vertices_list(P2, backend)
vlist1 = vertices_list(P1)
vlist2 = vertices_list(P2)
Vout = _minkowski_sum_vrep_nd(vlist1, vlist2;
apply_convex_hull=apply_convex_hull,
backend=backend, solver=solver)
Expand Down

0 comments on commit 257b400

Please sign in to comment.