-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1051 - Add more list of constraints methods #1053
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests!
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
Co-Authored-By: mforets <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a simple 1D test for each of the new functions?
tosimplehrep(constraints)
remove_redundant_constraints!(constraints)
remove_redundant_constraints(constraints)
constraints_list(::Intersection)
tosimplehrep(::LazySet)
for a non-HPoly
I fixed a bug and (I think) found another one. julia> constraints = [HalfSpace(N[1], N(0)), HalfSpace(N[-1], N(-1))];
julia> remove_redundant_constraints!(constraints)
true This polytope is empty and hence I expected the result |
9dc2a44
to
91a0a97
Compare
well, from the point of view of the algorithm |
Then the documentation should be clarified.
|
LazySets.Intersection: Error During Test at /Users/forets/.julia/dev/LazySets/test/unit_Intersection.jl:31
Test threw exception
Expression: ispermutation(constraints_list(I), [HalfSpace{Float64}(N[1, 0], N(2)), HalfSpace{Float64}(N[0, 1], N(2)), HalfSpace{Float64}(N[-1, 0], N(0)), H
alfSpace{Float64}(N[0, -1], N(0))])
MethodError: no method matching ispermutation(::Array{HalfSpace{Rational{Int64}},1}, ::Array{HalfSpace{Float64},1})
Closest candidates are:
ispermutation(::AbstractArray{T,1}, !Matched::AbstractArray{T,1}) where T at /Users/forets/.julia/dev/LazySets/src/helper_functions.jl:65
Stacktrace:
[1] top-level scope at /Users/forets/.julia/dev/LazySets/test/unit_Intersection.jl:31
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1044
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] include(::String) at ./client.jl:392
[6] macro expansion at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1079 [inlined]
[7] macro expansion at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1070 [inlined]
[8] macro expansion at /Users/forets/.julia/dev/LazySets/test/runtests.jl:69 [inlined]
[9] macro expansion at ./util.jl:156 [inlined]
[10] top-level scope at /Users/forets/.julia/dev/LazySets/test/runtests.jl:69 [inlined]
[11] top-level scope at ./none:0
LazySets.Intersection: Error During Test at /Users/forets/.julia/dev/LazySets/test/unit_Intersection.jl:75
Test threw exception
Expression: ispermutation(constraints_list(IA), [HalfSpace{Float64}(N[1, 0], N(2)), HalfSpace{Float64}(N[0, 1], N(2)), HalfSpace{Float64}(N[-1, 0], N(0)),
HalfSpace{Float64}(N[0, -1], N(0))])
MethodError: no method matching ispermutation(::Array{HalfSpace{Rational{Int64}},1}, ::Array{HalfSpace{Float64},1})
Closest candidates are:
ispermutation(::AbstractArray{T,1}, !Matched::AbstractArray{T,1}) where T at /Users/forets/.julia/dev/LazySets/src/helper_functions.jl:65
Stacktrace:
[1] top-level scope at /Users/forets/.julia/dev/LazySets/test/unit_Intersection.jl:75
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1044
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] include(::String) at ./client.jl:392
[6] macro expansion at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1079 [inlined]
[7] macro expansion at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Test/src/Test.jl:1070 [inlined]
[8] macro expansion at /Users/forets/.julia/dev/LazySets/test/runtests.jl:69 [inlined]
[9] macro expansion at ./util.jl:156 [inlined]
[10] top-level scope at /Users/forets/.julia/dev/LazySets/test/runtests.jl:69 [inlined]
[11] top-level scope at ./none:0
LazySets.Intersection: Error During Test at /Users/forets/.julia/dev/LazySets/test/unit_Intersection.jl:31 |
Documenter: setting up build directory.
Documenter: expanding markdown templates.
Documenter: building cross-references.
!! Unable to evaluate the type signature for '[`remove_redundant_constraints!(::Vector{LinearConstraint{N}})`](@ref)'. [src/lib/representations.md]
ERROR: UndefVarError(:N)
expression ':(remove_redundant_constraints!(::Vector{LinearConstraint{N}}))' in module 'LazySets'
!! Unable to evaluate the type signature for '[`remove_redundant_constraints!(::Vector{LinearConstraint{N}})`](@ref)'. [src/lib/representations.md]
ERROR: UndefVarError(:N)
expression ':(remove_redundant_constraints!(::Vector{LinearConstraint{N}}))' in module 'LazySets'
Documenter: running document checks.
> checking for missing docstrings.
!! 1 docstring potentially missing:
LazySets.constraints_list :: Union{Tuple{Intersection{N,S1,S2}}, Tuple{S2}, Tuple{S1}, Tuple{N}} where S2<:AbstractPolytope{N} where S1<:AbstractPolytope
{N} where N<:Real
> running doctests.
> checking footnote links.
Documenter: populating indices.
LazySets.doctests: Error During Test at /Users/forets/.julia/dev/LazySets/test/runtests.jl:162
Got exception outside of a @test |
Closes #1051.