Hello, I am working on a sage graph project, and for optimization, I have chosen to move it to cython. The code compiles just fine as is, but for further optimization I will need to use a union find data structure in my cdef function. So far, I was using DisjointSet from sage.sets.disjoint_set in a separate function : my issue is I do not know how to cdef such an object.
My initial attempt to solve this was to cimport the disjoint set class from the sage.sets.disjoint_set.pyx file, and use it to cdef.
This would in summary be something like this :
...from sage.sets.disjoint_set cimport DisjointSet
cdef DisjointSet D
D = DisjointSet(10)
...
Though this does not compile : I get an error related to a library (that I assumed was included in the install of sage). Just in case it was not, I manually installed GAP (which did not solve the problem).
/usr/bin/ld : ne peut trouver -lgap collect2: error: ld returned 1 exit status error: command 'x86_64-linux-gnu-g++' failed with exit status 1
(this message is in french but it translates exactly to "/usr/bin/ld: cannot find -lgap")
I believe this is mostly likely due to me misunderstanding how to import a class from the sage cython files. I had a similar problem when trying to work with bitsets (although the error was on the library pari instead of gap)
In case it is relevant, I am working on Ubuntu 20.04, installed sage with apt (sage version is 9.0).
Thank you in advance for any help.
Pierre