mcmtroffaes / pycddlib

A Python wrapper for Komei Fukuda's cddlib.
http://packages.python.org/pycddlib/
GNU General Public License v2.0
61 stars 9 forks source link

Readme does not mention format of the Polytope #29

Closed parthe closed 6 years ago

parthe commented 6 years ago

It is not clear from then documentation what the H representation is? Is the specified matrix the concatenation of [b, A] ?

mat = cdd.Matrix([[2,-1,-1,0],[0,1,0,0],[0,0,1,0]], number_type='fraction') mat.rep_type = cdd.RepType.INEQUALITY poly = cdd.Polyhedron(mat) print(poly) begin 3 4 rational 2 -1 -1 0 0 1 0 0 0 0 1 0 end ext = poly.get_generators() print(ext) V-representation linearity 1 4 begin 4 4 rational 1 0 0 0 1 2 0 0 1 0 2 0 0 0 0 1 end

stephane-caron commented 6 years ago

You can find this in Section 3 of the cdd manual:

I'm proposing some doc on this in https://github.com/mcmtroffaes/pycddlib/pull/30.

@parthe Had you visited the https://pycddlib.readthedocs.io/en/latest/polyhedron.html page? Or did you expect this to be written somewhere else in the doc?

parthe commented 6 years ago

Thanks for the reference to the cdd manual. I had visited the above link only. I expected it to find it on that page of the doc.

I think the two bullet points need to be added to the doc for new users who are unfamiliar to standard forms H and V representations

mcmtroffaes commented 6 years ago

Fixed in develop with https://github.com/mcmtroffaes/pycddlib/commit/5c43fb4f87ca77050863a701582a7a21476644a2 (thanks @stephane-caron !).