public PolynomialChaosAnalyzer(Model model, IAnalyzerProvider provider, IAnalyzer embeddedAnalyzer, IDictionary <int, ISolverSubdomain> subdomains, IPCCoefficientsProvider coefficientsProvider, int expansionOrder, int simulations, bool shouldFactorizeMatrices)
        {
            this.shouldFactorizeMatrices = shouldFactorizeMatrices;
            this.childAnalyzer           = embeddedAnalyzer;
            this.provider       = provider;
            this.model          = model;
            this.subdomains     = subdomains;
            this.expansionOrder = coefficientsProvider.ExpansionOrder;
            this.simulations    = simulations;
            this.childAnalyzer.ParentAnalyzer = this;
            this.matrices             = new Dictionary <int, IMatrix2D <double> > [coefficientsProvider.NoOfMatrices + 1];
            this.randomNumbers        = new double[simulations][];
            this.coefficientsProvider = coefficientsProvider;

            NormalDistribution n = new NormalDistribution();

            n.Mu    = 0;
            n.Sigma = 1;
            string[] randoms = new string[simulations];
            for (int i = 0; i < simulations; i++)
            {
                randomNumbers[i] = new double[expansionOrder];
                for (int j = 0; j < expansionOrder; j++)
                {
                    randomNumbers[i][j] = n.NextDouble();
                }
                randoms[i] = randomNumbers[i][0].ToString();
            }
            //File.WriteAllLines(String.Format(@"randoms.txt", expansionOrder), randoms);
        }
 public PolynomialChaosAnalyzer(Model model, IAnalyzerProvider provider, IAnalyzer embeddedAnalyzer, IDictionary <int, ISolverSubdomain> subdomains, IPCCoefficientsProvider coefficientsProvider, int expansionOrder, int simulations)
     : this(model, provider, embeddedAnalyzer, subdomains, coefficientsProvider, expansionOrder, simulations, true)
 {
 }