Ask Your Question
1

using sage library in C or C++?

asked 2017-10-17 10:57:44 -0600

studentboy gravatar image

Is there a way to run sage library in C/C++ or include the sage in C/C++? For example, I want to calculate minkowski sum, difference or decomposition in C or C++?

edit retag flag offensive close merge delete

Comments

The only possibility is to call the Sage python interpreter from your C/C++ program.

vdelecroix gravatar imagevdelecroix ( 2017-10-22 10:31:20 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-11-13 07:04:01 -0600

Jeroen Demeyer gravatar image

I obviously don't know your exact use case. First of all, this has nothing to do with Sage, it is really a Python question.

Embedding Python in C is explained here: https://docs.python.org/2/extending/e...

Alternatively: instead of using Sage in your C/C++ program, you could reverse this and use your C/C++ program inside Sage. That is relatively easy using Cython.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-10-17 10:57:44 -0600

Seen: 67 times

Last updated: Nov 13