コード例 #1
0
        public void ComputePath(ref PathFlows <TFlow, TLabel> path, double[] gaussians)
        {
            brownianBridge.FillPathIncrements(ref dWs, gaussians);
            IProcessPath processPath = processPathGen.Path(dWs);

            flowPathCalculator.ComputeFlows(ref path, processPath);
        }
コード例 #2
0
        public void ComputeFlows(ref PathFlows <double[], TLabel[]> pathFlows, IProcessPath processPath)
        {
            for (int i = 0; i < datesIndexes.Length; i++)
            {
                Func <double[], double>[] funcs = factorEvaluators[i];
                double[] factor = processPath.GetProcessValue(datesIndexes[i]);

                double[] flows = pathFlows.Flows[i];
                for (int j = 0; j < flows.Length; j++)
                {
                    flows[j] = funcs[j](factor);
                }
            }
        }
コード例 #3
0
 public void ComputeFlows(ref PathFlows <double, CouponFlowLabel> pathFlows, IProcessPath processPath)
 {
     fixingPathCalculator.ComputeFlows(ref fixingsPath, processPath);
     numerairePathCalc.ComputeFlows(ref numerairePath, processPath);
     productPathFlow.ComputePathFlows(ref pathFlows, fixingsPath, numerairePath);
 }