On Dec 27, 2007 4:42 AM, bill.p <[EMAIL PROTECTED]> wrote: > > Thanks for the help so far. I've been able to make some minor changes > to the code > and checked the behaviour. I'm still a bit stuck on how it all ties > together. I have added > a new routine to the C++ code, but so far I've been unable to trace > how the existing > code is invoked from the Python code. I've chased down all the leads I > can find, and > found .../sage/libs/mwrank/wrap.cc which looks promising but it > references a structure > (_mw) to invoke 'search', but I can't find where this structure is set > up and the > 'search' component initialised. I have added a similar function > 'search_int' into > sieve_search.cc and want to invoke this from the python code. > > It's a steep learning curve!
The mwrank <--> Sage library interface was the first interface ever written between Sage and a C++ library. It was written back when Cython didn't exist and Pyrex didn't support C++ at all. So it is very complicated and different than all current C++ <--> Sage library interfaces, and has been slated to be rewritten as soon as somebody gets the time to do so. Currently the structure of the interface is that there is a C library that wraps a C++ library, and Cython code then exposes the functionality of that C library. So the learning curve for that interface is high, and the desire to document it is nill, since it's going to be rewritten differently. For an example of the right way to wrap Cremona's C++ code, now that C++ is fully supported from Cython, see SAGE_ROOT/devel/sage/sage/libs/cremona William -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---