Problems with RamdomizedLDS and GenericLowDiscrepancy

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with RamdomizedLDS and GenericLowDiscrepancy

havard.hvarnes



Hi,

I'm having problems compiling the following lines of code with 0.3.9.

      //typedef QuantLib::RamdomizedLDS<QuantLib::SobolRsg,
      //
QuantLib::RandomSequenceGenerator<MersenneTwisterUniformRng> > ranLDS;
      // Tried this before now it is copied into the below statement

      typedef
QuantLib::GenericLowDiscrepancy<QuantLib::RamdomizedLDS<QuantLib::SobolRsg,

QuantLib::RandomSequenceGenerator<MersenneTwisterUniformRng> >,

QuantLib::InverseCumulativeNormal>  GaussianRLDSCumulative;

      GaussianRLDSCumulative::rsg_type gaussQuasiSeqGen2 =

GaussianRLDSCumulative::make_sequence_generator(2*mTimeSteps,0);

My experience with c++ is limited but I have from time to time managed to
use QL. Previously I used the following line of code to do the same thing
with the sobol-generator (with success):

      QuantLib::LowDiscrepancy::rsg_type gaussQuasiSeqGen =

QuantLib::LowDiscrepancy::make_sequence_generator(2*mTimeSteps,0);

I dont quite see the difference when comparing the code above with the one
in rngtraits.hpp. Is it a bug or am I doing something wrong?

regards,
Haavard




                                NOTICE
               Please immediately e-mail back to sender
               if you are not the intended recipient.

               Thereafter delete the e-mail along with
               any attachments without making copies.

               Elkem reserves all rights of privilege,
               confidentiality and copyright.



Reply | Threaded
Open this post in threaded view
|

Re: Problems with RamdomizedLDS and GenericLowDiscrepancy

Luigi Ballabio
On 06/21/2005 03:12:12 PM, [hidden email] wrote:

>
> I'm having problems compiling the following lines of code with 0.3.9.
>
>       typedef
> QuantLib::GenericLowDiscrepancy<QuantLib::RamdomizedLDS<QuantLib::SobolRsg,
>
> QuantLib::RandomSequenceGenerator<MersenneTwisterUniformRng> >,
>
> QuantLib::InverseCumulativeNormal>  GaussianRLDSCumulative;
>
>       GaussianRLDSCumulative::rsg_type gaussQuasiSeqGen2 =
>
> GaussianRLDSCumulative::make_sequence_generator(2*mTimeSteps,0);

Haavard,
        I managed to compile the above once I added the 'QuantLib::'  
qualification before the MersenneTwisterUniformRng class. Does the  
problem persist after doing this? What compiler are you using?

Later,
        Luigi


----------------------------------------

Flon's Law:
         There is not now, and never will be, a language in
         which it is the least bit difficult to write bad programs.