Re: Re : Hull White Tree

Posted by Guowen Han-2 on
URL: http://quantlib.414.s1.nabble.com/Hull-White-Tree-tp5052p5055.html

Hi Luigi,
 
I am using QuantLib 3.10.

I have an error message saying that ShortRateTree is not defined even the ql/ShortRateModel/onefactormodel.hpp is includeed. I guess this is because that the ShortRateTree is an inner class of OneFactorModel. Then I changed it to use OneFactorModel::ShortRateTree, the problem then changed to be that ShortRateTree is protected.
 
Looks like I am missing something here.
 
Thanks,
 
Guowen
 
On 9/24/06, Luigi Ballabio <[hidden email]> wrote:

On Sep 24, 2006, at 3:02 AM, Guowen Han wrote:

> This does not work. Anyone has different suggestions?

In which way it doesn't work? (except for the double << which should be
a single one)

Luigi


> On 9/20/06, keztenpens <[hidden email]> wrote: Hi,
>>
>> You have to perform a dynamic cast to the required type :
>> boost::shared_ptr<ShortRateTree> shortRateTree =
>>
>>         boost::dynamic_pointer_cast<<ShortRateTree>(hw->tree());