Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import octave implementation to C++ or C#

I am currently working on a project that is related to machine learning. There I should import octave into C++ or C# GUI library, because the octave contains a bit of coding there is a huge project after that.

I wonder how I call the octave implementation into C++ and work there as a C++ function also.

like image 987
Nipun Alahakoon Avatar asked Mar 21 '23 05:03

Nipun Alahakoon


1 Answers

What you are probably looking for is Dynamically Linked Functions.

Octave has the possibility of including compiled code as dynamically linked extensions and then using these extensions as if they were part of Octave itself. Octave can call C++ code through its native oct-file interface or C code through its mex interface. It can also indirectly call functions written in any other language through a simple wrapper. The reasons to write code in a compiled language might be either to link to an existing piece of code and allow it to be used within Octave, or to allow improved performance for key pieces of code.

For the reverse, see here.

like image 100
Robert Harvey Avatar answered Apr 06 '23 18:04

Robert Harvey