Re: Returning multiple values from a Monte-Carlo pricing engine

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Returning-multiple-values-from-a-Monte-Carlo-pricing-engine-tp9175p9180.html

On Tue, 2010-12-14 at 12:48 +0000, Simon Ibbotson wrote:
> Unfortunately not; McSimulation::value() instantiates a result_type
> (i.e. an Array) from a vector<double> obtained from the
> sampleAccumulator at several points (also in ::valueWithSamples()).
>
> Therefore, Array would need a new constructor either:
>
> [...]
>
> Which would you recommend?

Neither.  You can use the existing
Array(ForwardIterator begin, ForwardIterator end);
and pass the begin() and end() of the vector.

Luigi


--

It is better to know some of the questions than all of the answers.
-- James Thurber



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev