|
From: Tito I. <tit...@ya...> - 2008-08-17 19:18:40
|
Hi,
Could someone kindly add the below code to QuantLib-SWIG/SWIG/stochasticprocess.i
It's a purely additive change: it just exposes a teeny bit of functionality to users of the SWIG interfaces to QuantLib.
I have just tested it against the current repository and it builds and runs correctly. If you provide me with access to that project, I'll be happy to make the change myself. Thanks and regards,
Tito.
--
%{
using QuantLib::GeometricBrownianMotionProcess;
typedef boost::shared_ptr<StochasticProcess> GeometricBrownianMotionProcessPtr;
%}
%rename(GeometricBrownianMotionProcess) GeometricBrownianMotionProcessPtr;
class GeometricBrownianMotionProcessPtr : public StochasticProcess1DPtr {
public:
%extend {
GeometricBrownianMotionProcessPtr
(double initialValue, double mue, double sigma) {
return new GeometricBrownianMotionProcessPtr
(new GeometricBrownianMotionProcess(initialValue, mue, sigma));
}
}
};
|