@@ -120,19 +120,20 @@ function removevredundancy!(p::Polyhedron; strongly=false, planar=true)
120120 vredundancy (p) == NO_REDUNDANCY && return
121121 if fulldim (p) == 2 && ! strongly && planar
122122 setvrep! (p, planar_hull (vrep (p)), NO_REDUNDANCY)
123- end
124- solver = _solver_warn (p, true , strongly)
125- if solver === nothing
126- detecthlinearity! (p)
127- detectvlinearity! (p)
128- nonred = removevredundancy (vrep (p), hrep (p), strongly= strongly)
129123 else
130- detectvlinearity! (p)
131- nonred = removevredundancy (vrep (p), solver)
124+ solver = _solver_warn (p, true , strongly)
125+ if solver === nothing
126+ detecthlinearity! (p)
127+ detectvlinearity! (p)
128+ nonred = removevredundancy (vrep (p), hrep (p), strongly= strongly)
129+ else
130+ detectvlinearity! (p)
131+ nonred = removevredundancy (vrep (p), solver)
132+ end
133+ # If `strongly` then we only remove strongly redundant elements
134+ # henwe we cannot say that the redundancy is `NO_REDUNDANCY`.
135+ setvrep! (p, nonred, strongly ? LINEARITY_DETECTED : NO_REDUNDANCY)
132136 end
133- # If `strongly` then we only remove strongly redundant elements
134- # henwe we cannot say that the redundancy is `NO_REDUNDANCY`.
135- setvrep! (p, nonred, strongly ? LINEARITY_DETECTED : NO_REDUNDANCY)
136137end
137138
138139function _redundant_indices (rep:: Representation , model:: MOI.ModelLike , T:: Type ,
0 commit comments