public DistributionSettingsBinding(ExpressionArgument owner, DistributionSettings instance, PropertyInfo propertyInfo) { _owner = owner; _instance = instance; _propertyInfo = propertyInfo; Name = TranslationSource.Instance[_propertyInfo.Name]; }
public void Update(ExpressionArgument source, DistributionSettings settings) { Clear(); var properties = settings.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public) .Where(x => x.CanWrite && x.CanRead); foreach (var property in properties) { Add(new DistributionSettingsBinding(source, settings, property)); } }
public DistributionEditWindow(Window owner, ExpressionArgument expressionArgument) { ExpressionArgument = expressionArgument; InitializeComponent(); }
public void Process(Configuration configuration) { lock (processLocker) { Dispatcher.UIThread.InvokeAsync(() => { Warnings.Clear(); }); var univariate = ExpressionArgument.CreateDictionary(configuration.ExpressionArguments); var multivariate = MultivariateExpressionArgument.CreateDictionary(configuration.MultivariateExpressionArguments); if (multivariate.Count == 0) { multivariate = null; } Stopwatch sw = Stopwatch.StartNew(); if (configuration.EvaluateRandomAlgebra) { RandomAlgebra = DistributionManager.RandomsAlgebraDistribution( configuration.Expression, univariate, multivariate, configuration.Samples); sw.Stop(); RandomsAlgebraTime = sw.Elapsed; } else { RandomAlgebra = null; RandomsAlgebraTime = null; } if (configuration.EvaluateMonteCarlo) { sw.Restart(); MonteCarlo = DistributionManager.MonteCarloDistribution( configuration.Expression, univariate, multivariate, configuration.Experiments, configuration.Pockets); sw.Stop(); MonteCarloTime = sw.Elapsed; } else { MonteCarlo = null; MonteCarloTime = null; } UpdateParameters(configuration.Probability); } }