Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DistributionsEvaluator"/> class.
        /// </summary>
        /// <param name="modelExpression">Model expression, e.g. "A+B*3+1", where A and B, are parameters of function.</param>
        public DistributionsEvaluator(string modelExpression)
        {
            if (string.IsNullOrWhiteSpace(modelExpression))
            {
                throw new DistributionsArgumentException(DistributionsArgumentExceptionType.MissingExpression);
            }

            ExpressionText = modelExpression;
            Parsed         = Parse(modelExpression);

            compiled = Compile(Parsed.ToExpression());

            Parameters = nodeParameters.Select(x => x.Parameter).ToArray();
        }