Rewrite FDEngineAdapter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
JQuantLib |
New
|
Medium
|
Unassigned |
Bug Description
<b>In QuantLib/C++, FDEngineAdapter is defined as</b>
<pre>
template <typename base, typename engine>
class FDEngineAdapter : public base, public engine { ... }
</pre>
<b>where</b>
* base ultimately extends FDVanillaEngine
* engine ultimately extends OneAssetOption:
<b>and employed as examples below:</b>
<pre>
typedef FDEngineAdapter
<FDShoutCon
FDShoutEngine;
typedef FDEngineAdapter
<FDAmerican
FDAmericanEngine;
typedef FDEngineAdapter
<FDDividend
FDDividendEurop
typedef FDEngineAdapter
<FDDividend
FDDividendEurop
typedef FDEngineAdapter
<FDDividend
FDDividendEurop
</pre>
<b>Note:</b>
* Template parameter "base" maybe a simple class or a parameterized class.
<b>Translating to Java</b>
When we translate to Java, we should <i>probably</i> translate like this:
<pre>
public class FDEngineAdapter
<Base extends FDVanillaEngine, Engine extends OneAssetOption.
implements OneAssetOption.
</pre>
and inside our implementation of FDEngineAdapter we should be able to accept Base as both a simple class and also a parameterized class.
Suggestion: Employ TypeTokenTree to help sort our generic parameters.
=============
Relationships
=============
duplicate of http://
related to http://
child of http://
At the moment the following classes are missing: uropeanEngineMe rton73 uropeanEngineSh iftScale
FDDividendE
FDDividendE
Some code review was done in classes ngine ngine uropeanEngine uropeanEngineMe rton73 uropeanEngineSh iftScale
FDEngineAdapter
FDAmericanE
FDShoutEngine
FDAmericanE
FDDividendE
FDDividendE
FDDividendE
See related issue #425 in order to know more details about what is still pending.