I need to add a new method to my swig template class, for example:
I am declaring a template class in myswig.i as follows:
%template(DoubleVector) vector<double>;
this will generate a class named "DoubleVector" in the generated .py file with some generated methods. lets suppose they are func1(), func2() and func3(). These are generated functions and i have no control over them. Now, if I want to add a new method called "func4()" to this class(DoubleVector), how may I do it? Is it possible?
I know of a identifier called %pythoncode but I could not use it to define a new function in this template class.