Skip to content
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

Matroid.COLOOPS property not found #372

Open
FGlazov opened this issue Nov 24, 2021 · 3 comments
Open

Matroid.COLOOPS property not found #372

FGlazov opened this issue Nov 24, 2021 · 3 comments

Comments

@FGlazov
Copy link

FGlazov commented Nov 24, 2021

Asking for the COLOOPS of a matroid results in an error. Doing

julia> using Oscar
julia> m = Polymake.matroid.uniform_matroid(2,2);
julia> m.COLOOPS

results in the following error.

Exception occured at Polymake side:
unknown property Matroid::COLOOPS at /home/fedor/.julia/artifacts/398add9dbaf26c0295d73370854a014022eb4e4c/share/polymake/perllib/Polymake/Core/BigObjectType.pm line 432.

It is possible to recover the coloops using m.DUAL.LOOPS instead.

In polymake, doing

polytope > application 'matroid';
matroid > $m = uniform_matroid(2,2);
matroid > print $m->COLOOPS;

gives the expected output of {0, 1}.

@benlorenz
Copy link
Member

COLOOPS is not a real property but a user_method that acts as a fake property which in the perl shell looks like a property but gets translated differently in the Polymake.jl interface. This is unfortunately somewhat confusing ...

You can call it this way:

julia> using Oscar
julia> m = Polymake.matroid.uniform_matroid(2,2);
julia> Polymake.matroid.coloops(m)
pm::Set<long, pm::operations::cmp>
{0 1}

@FGlazov
Copy link
Author

FGlazov commented Nov 24, 2021

Ok! Thanks, that snippet worked for me.

Perhaps it would be a good idea to point out in the polymake documentation that it is a fake property? At the moment, the polymake documentation doesn't do a good job here: https://polymake.org/doku.php/documentation/latest/matroid/matroid#coloops

And probably for all the other fake properties as well... in a way it's kind of a minefield, where two properties in the documentation act differently inside Polymake.jl

@benlorenz
Copy link
Member

I don't think the polymake documentation is the best place for this as this was done on purpose to be hidden to the (polymake-)user.
We can try if it is possible to allow those to be retrieved also via the property syntax in julia with some extra magic during code-generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants