26 : factors_(factors), steps_(steps),
30 #if defined(QL_EXTRA_SAFETY_CHECKS)
37 std::transform(currentSequence.begin()+start,
38 currentSequence.begin()+end,
62 ext::shared_ptr<BrownianGenerator>
64 return ext::shared_ptr<BrownianGenerator>(
MTBrownianGeneratorFactory(unsigned long seed=0)
ext::shared_ptr< BrownianGenerator > create(Size factors, Size steps) const override
Mersenne-twister Brownian generator for market-model simulations.
RandomSequenceGenerator< MersenneTwisterUniformRng > generator_
Real nextStep(std::vector< Real > &) override
Size numberOfFactors() const override
Size numberOfSteps() const override
MTBrownianGenerator(Size factors, Size steps, unsigned long seed=0)
InverseCumulativeNormal inverseCumulative_
const sample_type & nextSequence() const
const sample_type & lastSequence() const
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::size_t Size
size of a container