Hi,

On 10 Mrz., 18:26, alex <[email protected]> wrote:
> If I would like to write an extension (a function for example) for
> sage, using for example C++ and cython, how can I excange data between
> my own function and sage ?
>

Between C++ and Cython, there is no "Sage" interface --- just write C+
+ library
that can be linked to other C++ code via the interfaces/objects/
headers you like.
Then you are able to access this library from Cython, too.
See www.cython.org and the documentation there.

> What data types I have to know ?
>
> How can I handle symbolic objects (with their parse threes), and
> numerical data structures ?
>
> How can I pass to and/or simplify symbolic objects form within my C++
> function ?
>

Why would you want to do this? Sage is designed in such a way that you
can do the "high-level" stuff in Sage itself, and access C/C++ via
Cython
for the low-level stuff where you need real speed for.
If Sage does not "simplify well enough", maybe pass it to Maxima or
whatever via the exisiting interfaces in Sage, do the simplification
there,
and pass the result back.

> How handle numerical data structures for modelling an orbit of a
> differential equation ?
>

Create and use your own, or use e.g. what numpy provides.

> How excange data structures and types ?
>
> Can you please tell me how to finde more information (more than in the
> developers guide pdf file !) ??!
>

A while ago I put up a patch (at #4857 [with patches, needs review]
spkg development documentation and handling) where I tried to write
down some of my own experiences for others. It elaborates a bit more
on how to create Sage packages (spkg) and has an example C library
spkg.

This patch needs a rebase, but apart from that --- maybe you'll find
helpful information.

> Thank you.

Cheers,
gsw
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to