JuliaPolyhedra / CDDLib.jl

cdd wrapper module for Julia. cdd is a library for polyhedra manipulation such as double description and Fourier-Motzkin elimination
Other
36 stars 12 forks source link

Adjacent vertices (edges) #71

Open stla opened 2 years ago

stla commented 2 years ago

Hello,

I see in the cddlib documentation that there is a function to get the list of adjacent vertices. I spent the afternoon to try to get it using Julia, I didn't manage. Can one get this list with CDDLib.jl?

blegat commented 2 years ago

Hi,

We currently don't have a nice interface for that. Neither for incidence information: https://github.com/JuliaPolyhedra/CDDLib.jl/issues/21 They are both blocked by the fact that we still need to wrap the setfamily struct. Let me take a look.

blegat commented 2 years ago

Can you try https://github.com/JuliaPolyhedra/CDDLib.jl/pull/72 and let me know whether it works for you ?

stla commented 2 years ago

Hi,

Ok for trying, but could you explain me how I install this version in Julia?

(in the meantime, I managed to get the edges with the Python library pycddlib)

blegat commented 2 years ago

Enter the Pkg mode of the REPL (by pressing ]) and write

(v1.7) pkg> add CDDLib#bl/adjacency
stla commented 2 years ago

Yes, that seems to work fine. Thank you!

komeif commented 2 years ago

@stla @blegat dd_Matrix2Adjacency is to compute the adjacency of input without computing the second representation, see adjacency.c program in src. This is useful when the conversion to the second representation takes a long time. If the conversion is easy and in particular it has been computed by dd_DDMatrix2Poly then the adjacency and the incidence of both input and output are in the dd_PolyhedraPtr data structure. See, scdd.c to see how to write out all four information.