-
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
==/issubset on HPolytopes #598
Comments
About |
No, == is not terribly critical for me. I was using it to test other features to see that they worked as I expected. I.e. performing some transformations and then comparing the result to the one I expected. Surprising results led to visual inspection led to discovering the == issue. Unfortunately I searched the open issues for "isequal" rather than "==" However, given the recommendation in the docs that is mentioned in your linked issue, I wonder if the following definition could be useful as a catchall:
It is certainly less efficient than a per-type definition that leverages knowledge of the type, but would easily fill the void until the complete set of == is supported. This does assume that all fields internal to all LazySets are either other LazySets or types that already have == defined on them correctly. |
Looks good to me as well. This function could be in |
Sure thing. Submitting the pull request for that now 😄 |
About Hence I would say it is a misuse here. For efficiency I would not require that we check for boundedness on our side. We could provide a function that checks that explicitly (I created #605). |
Ah I see. I hadn't considered that the set was not bounded. Thanks for the explanation. I agree that checking boundedness in issubset is overkill, but I am not sure that, in general, comparing two unbounded polytopes is necessarily a misuse. That said, I don't have any reasonable solution in mind for dealing with this. |
I agree that it makes sense to define set inclusion for unbounded polyhedra. For that use case i would go for adding a new type |
I created #606. |
Several behaviors observed:
== returning false negatives(fixed by defines == generically to work on LazySet pairs #604)== (fixed by #604)
Defining:
solves this. I am not familiar enough with the package to know whether this definition is problematic, or whether a more general one is possible, etc.
issubset
Also, given two HPolytopes (these two were generated using rand() values and happened to exhibit this behavior. Not all pairs of HPolytopes do this, and I don't yet know why)
x1 and x2 cannot both be subsets of one another, since they are not equal.
I cannot find the general reason for this. For some values of x1 and x2,
issubset(x1, x2)
works butThe text was updated successfully, but these errors were encountered: