From fa3bcd31df6e646a19e4e95c23e4b6173d6bade1 Mon Sep 17 00:00:00 2001 From: schillic Date: Fri, 26 Jul 2024 16:22:55 +0200 Subject: [PATCH] let 'remove_redundant_constraints' return empty list --- src/Interfaces/AbstractPolyhedron_functions.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Interfaces/AbstractPolyhedron_functions.jl b/src/Interfaces/AbstractPolyhedron_functions.jl index ec04e9c785..e2a99eabc1 100644 --- a/src/Interfaces/AbstractPolyhedron_functions.jl +++ b/src/Interfaces/AbstractPolyhedron_functions.jl @@ -235,7 +235,7 @@ Remove the redundant constraints of a given list of linear constraints. linear program ### Output -The list of constraints with the redundant ones removed, or an empty set if the +The list of constraints with the redundant ones removed, or an empty list if the constraints are infeasible. ### Notes @@ -253,8 +253,7 @@ function remove_redundant_constraints(constraints::AbstractVector{S}; if remove_redundant_constraints!(constraints_copy; backend=backend) return constraints_copy else # the constraints are infeasible - N = eltype(first(constraints)) - return EmptySet{N}(dim(constraints[1])) + return Vector{eltype(constraints)}(undef, 0) end end