Polymake.jl
Polymake.jl copied to clipboard
Matroid.COLOOPS property not found
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}.
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}
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
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.