Polymake.jl
Polymake.jl copied to clipboard
use BigObject<type> information from json
Maybe our faux constructors can actually create types:
e.g. Polytope{Rational}(...) could create BigObject{Polytope{Rational}}
this way we could leverage dispatch for auto-generated functions (and their docs).
Right now e.g. polytope.dim function is created three times (with the same signature, so we don't see warnings) and docs are overwritten, so we need to do hacks like this:
https://github.com/oscar-system/Polymake.jl/blob/2c5910ff49e75584ddf18f01dac03e6bab87cdfa/src/meta.jl#L189
We would need to add the dependency tree as well? A function taking a Cone can also accept a Polytope.
can we we see the hierarchy somehow in json?
these three definitions for dim would cover that without the necessity of duplicating the hierarchy, but maybe that will probably only work for methods....
#285 contains a new field linear_isa for the BigObjects:
"name" : "VoronoiPolyhedron",
"linear_isa" : [
"polytope::Polytope",
"polytope::Cone"
],
It will list all (generic) types that the current type inherits from (also indirect dependencies but I could change that).