public SimulationContext(IJ4JLoggerFactory loggerFactory)
            : base("Investment Simulator")
        {
            _logger = loggerFactory?.CreateLogger(typeof(SimulationContext)) ??
                      throw new NullReferenceException(nameof(loggerFactory));

            Betas = new BetaDistribution(this, loggerFactory);

            ChildModels.Add(Betas);
        }
Exemplo n.º 2
0
        public ModelWeigh(Type model, IEnumerable <Type> childModels)
        {
            Model = model;

            var index = 0;

            foreach (var childModel in childModels)
            {
                if (!ChildModels.ContainsKey(childModel))
                {
                    index += 100;
                    ChildModels.Add(childModel, index);
                }
            }
        }