[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: embedded octave: how to define new functions?

From: Andrea Latina
Subject: Re: embedded octave: how to define new functions?
Date: Wed, 6 Sep 2006 16:39:18 +0200


| I've considered this possibility but, as our simulation code is
| already productive and working fine with its -rather complicate- data
| structures, I thought that the embedding is the best solution. (But
| maybe I'm wrong.)

Do you need to expose all of these things in a scriptable interface,
or can you get away with just having a few functions to control your
code from Octave along with some functions to get at the data that is
interesting for later processing?

The first option you said: all these things must be exposed in a
scriptable interface. Our code (I'm not the main author, I'm taking
over and improving it) counts more than 200 functions and commands. It
is a code for simulating particle accelerators.

A typical simulation script consists mainly in internal function
calls, with some loop and a few control statements. The amount of data
produced is moderately small. Another typical study is performance
maximization: where the results of some simulation are optimized with
respect to some parameters. In this case, a language such as octave
would be perfect.

BTW, are you distributing your code?  If so, is it freely available
under terms that are compatible with the GPL?  If not, then you would
certainly not be able to embed Octave in it and distribute it unless
it has a license that is compatible with the GPL.

Yes, our code is freely available and already distributed under the
GPL license. You can have a look at this page:
https://savannah.cern.ch/projects/placet/ . Look at the manual -rather
outdated, unfortunately- if you want to have a flavour of a typical
simulation script.

In the meanwhile I'm proceeding in the embedding and the results seem
amazingly promising!


P.S. Sorry, John, for the double reply. I clicked "reply" instead of
"reply all".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]