Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Evaluation"/> struct.
        /// </summary>
        /// <param name="connective">
        /// The connective.
        /// </param>
        /// <param name="result">
        /// The result.
        /// </param>
        public Evaluation(IConnectiveOperator connective, UnitInterval result)
        {
            Validate.NotNull(connective, nameof(connective));

            this.Connective = connective;
            this.Result     = result;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Condition"/> class.
        /// </summary>
        /// <param name="connective">
        /// The connective.
        /// </param>
        /// <param name="premises">
        /// The premises.
        /// </param>
        /// <param name="weight">
        /// The weight.
        /// </param>
        /// <returns>
        /// The <see cref="Condition"/>.
        /// </returns>
        public Condition(
            IConnectiveOperator connective,
            IList <Premise> premises,
            UnitInterval weight)
        {
            Validate.NotNull(connective, nameof(connective));
            Validate.CollectionNotNullOrEmpty(premises, nameof(premises));
            Validate.NotNull(weight, nameof(weight));

            this.Connective = connective;
            this.Premises   = premises;
            this.Weight     = weight;
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Premise"/> class.
        /// </summary>
        /// <param name="connective">
        /// The connective logic operator.
        /// </param>
        /// <param name="variable">
        /// The linguistic variable.
        /// </param>
        /// <param name="evaluator">
        /// The evaluation logic operator.
        /// </param>
        /// <param name="state">
        /// The fuzzy state.
        /// </param>
        public Premise(
            IConnectiveOperator connective,
            LinguisticVariable variable,
            IEvaluationOperator evaluator,
            FuzzyState state)
            : base(variable, evaluator, state)
        {
            Validate.NotNull(connective, nameof(connective));
            Validate.NotNull(variable, nameof(variable));
            Validate.NotNull(state, nameof(state));

            this.Connective = connective;
            this.Subject    = variable.Subject;
        }