Mercurial > hg > aimc
changeset 336:890332908f57
- Better python support for signals
author | tomwalters |
---|---|
date | Wed, 04 Aug 2010 07:20:26 +0000 |
parents | 71c438f9daf7 |
children | d10433224758 |
files | trunk/src/Support/SignalBank.h trunk/swig/aim_modules.i |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Support/SignalBank.h Wed Aug 04 06:41:56 2010 +0000 +++ b/trunk/src/Support/SignalBank.h Wed Aug 04 07:20:26 2010 +0000 @@ -58,6 +58,10 @@ return signals_[channel]; }; + inline const vector<float> &get_signal(int channel) const { + return signals_[channel]; + }; + inline float sample(int channel, int index) const { return signals_[channel][index]; }
--- a/trunk/swig/aim_modules.i Wed Aug 04 06:41:56 2010 +0000 +++ b/trunk/swig/aim_modules.i Wed Aug 04 07:20:26 2010 +0000 @@ -18,6 +18,12 @@ %module aimc %include "std_string.i" %include stl.i +%include "std_vector.i" + +namespace std { + %template(FloatVector) vector<float>; +} + %{ #include "Support/Common.h" #include "Support/Module.h" @@ -35,6 +41,7 @@ %} %include "Support/Parameters.h" +using namespace std; %include "Support/SignalBank.h" namespace aimc {