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
list_to_set/2 is not required to order #150
Comments
If you would like to use ordered sets, you need It can also run slower. It would only run a ord_XXX operation, doesn't need a P.S.: You see here, its not
It has this implementation:
https://www.swi-prolog.org/pldoc/doc/_SWI_/library/ordsets.pl?show=raw |
In the same :- uses(set, [
as_set/2 as list_to_set/2, intersection/3, subtract/3, union/3
]). The Logtalk |
Ok, you use the same protocol for ord_XXX.
Is it more performant? Or is it slower than with lists? no union, intersection, etc.. here: Edit 24.08.2022
|
Union, intersection, ... are set operations. Subtract is not a set only operation. |
What do you mean are subtract is no set operation?
In SWI-Prolog its clearer since there is no name overloading: https://www.swi-prolog.org/pldoc/doc_for?object=ord_subtract/3 P.S.: Mathematically we would write P \ Q for the set difference. |
I find a commit comment:
list_to_set/2
does not order, only deduplicate.You can try yourself in SWI-Prolog:
In some Prolog systems it does order, but this
is not a guarantee neither a requirement.
The text was updated successfully, but these errors were encountered: