.withSamples(100));
.withSamples(1023));
    Handle<Instrument> makeEuropeanOption(Option::Type type,                                          const Handle<MarketElement>& u,                                          double k,                                          const Handle<TermStructure>& q,                                          const Handle<TermStructure>& r,                                          const Date& exDate,                                          const Handle<BlackVolTermStructure>&                                               vol,                                          EngineType engineType = Analytic) {        Handle<PricingEngine> engine;        switch (engineType) {          case Analytic:            engine = Handle<PricingEngine>(new AnalyticEuropeanEngine);            break;          case JR:            engine = Handle<PricingEngine>(                new BinomialVanillaEngine(                    BinomialVanillaEngine::JarrowRudd, 800));            break;          case CRR:            engine = Handle<PricingEngine>(                new BinomialVanillaEngine(                    BinomialVanillaEngine::CoxRossRubinstein, 800));          case EQP:            engine = Handle<PricingEngine>(                new BinomialVanillaEngine(                    BinomialVanillaEngine::EQP, 800));            break;          case Trigeorgis:            engine = Handle<PricingEngine>(                new BinomialVanillaEngine(                    BinomialVanillaEngine::Trigeorgis, 800));            break;          case Tian:            engine = Handle<PricingEngine>(                new BinomialVanillaEngine(                    BinomialVanillaEngine::Tian, 800));            break;          case PseudoMonteCarlo:            engine = Handle<PricingEngine>(                MakeMCEuropeanEngine<PseudoRandom>()                    .withStepsPerYear(1)                    .withTolerance(0.05)                    .withSeed(42));            break;          case QuasiMonteCarlo:            engine = Handle<PricingEngine>(                MakeMCEuropeanEngine<LowDiscrepancy>()                    .withStepsPerYear(1)                    .withSamples(100));            break;          default:            throw Error("Unknown engine type");        }        return Handle<Instrument>(            new VanillaOption(type, RelinkableHandle<MarketElement>(u), k,                              RelinkableHandle<TermStructure>(q),                              RelinkableHandle<TermStructure>(r),                              EuropeanExercise(exDate),                              RelinkableHandle<BlackVolTermStructure>(vol),                              engine));    }