CDDLib.jl icon indicating copy to clipboard operation
CDDLib.jl copied to clipboard

Adjacent vertices (edges)

Open stla opened this issue 2 years ago • 6 comments

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?

stla avatar Mar 12 '22 18:03 stla

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 avatar Mar 12 '22 19:03 blegat

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

blegat avatar Mar 12 '22 20:03 blegat

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)

stla avatar Mar 12 '22 21:03 stla

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

(v1.7) pkg> add CDDLib#bl/adjacency

blegat avatar Mar 12 '22 21:03 blegat

Yes, that seems to work fine. Thank you!

stla avatar Mar 13 '22 00:03 stla

@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.

komeif avatar Jun 25 '22 11:06 komeif