|
Hi all,
I need to call the MCEuropeanEngine from Java, but the parameters declared in
the Java wrapper are of type SWIGTYPE_p_intOrNull, etc. I know I should use
native constructors for these but coud not find out to what class they correspond.
This seems to be a simple pointer for an int.
How do I create time steps as it corresponds to a native int.
Thanks for the help
Nabil
public MCEuropeanEngine(String traits, SWIGTYPE_p_intOrNull timeSteps, SWIGTYPE_p_intOrNull timeStepsPerYear, .... ) {
this(quantlibJNI.new_MCEuropeanEngine(traits,
SWIGTYPE_p_intOrNull.getCPtr(timeSteps),
SWIGTYPE_p_intOrNull.getCPtr(timeStepsPerYear), .....);
}
Here is the C++ header :
Size is typedefed as int
MCEuropeanEngine(Size timeSteps,
Size timeStepsPerYear,
bool brownianBridge,
bool antitheticVariate,
bool controlVariate,
Size requiredSamples,
Real requiredTolerance,
Size maxSamples,
BigNatural seed);
|