mcmtroffaes / pycddlib

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

Adjacency list / vector adjacency matrix not yet implemented #32

Closed bobmyhill closed 4 years ago

bobmyhill commented 5 years ago

Is there any way to access the adjacency list of a Polytope with pycddlib? I've had a brief look through the source code, and it doesn't look like it's implemented.

If it would be a valuable contribution, might I try to add an adjacency attribute to the Polyhedron class? I don't have any experience with cython, but I have a little experience with C and python.

mcmtroffaes commented 5 years ago

You are correct, that's not exposed. If there's a sensible way to expose it, a contribution would be most welcome.

bobmyhill commented 5 years ago

Thanks for the quick reply! I've opened #33, which exposes the appropriate bits of code. The new examples and tests seem to be working. I'm happy to make any changes/improvements you think would be useful.

bobmyhill commented 5 years ago

The implementation also allowed me to expose the incidence functions, which I've done in #34.

mcmtroffaes commented 4 years ago

I think this is superseded by #34 now, so this can be closed?

bobmyhill commented 4 years ago

@mcmtroffaes Yes, this would be fixed by #34. I don't normally close issues until the resolving PR is merged, but it's up to you!

mcmtroffaes commented 4 years ago

Yeah, the code is included in the other pull request and I think it makes sense to merge it all at once. Further discussion can happen in #34 so I'll close this.