Exemple #1
0
        /// <summary>
        /// Add a nominal item based on a range.
        /// </summary>
        /// <param name="inputField">The input field to use.</param>
        /// <param name="low">The low value of the range.</param>
        /// <param name="high">The high value of the range.</param>
        public void AddItem(IInputField inputField, double low,
                            double high)
        {
            var item = new NominalItem(inputField, low, high);

            _items.Add(item);
        }
Exemple #2
0
        /// <summary>
        /// Determine which item's index is the value.
        /// </summary>
        public override void RowInit()
        {
            for (int i = 0; i < _items.Count; i++)
            {
                NominalItem item = _items[i];
                if (item.IsInRange())
                {
                    _currentValue = i;
                    break;
                }
            }

            if (_equilateral == null)
            {
                _equilateral = new Equilateral(_items.Count, _high,
                                               _low);
            }
        }
 /// <summary>
 /// Add a nominal item based on a range.
 /// </summary>
 /// <param name="inputField">The input field to use.</param>
 /// <param name="low">The low value of the range.</param>
 /// <param name="high">The high value of the range.</param>
 public void AddItem(IInputField inputField, double low,
                     double high)
 {
     var item = new NominalItem(inputField, low, high);
     _items.Add(item);
 }
        /// <summary>
        /// Calculate the value for the specified subfield.
        /// </summary>
        /// <param name="subfield">The subfield to calculate for.</param>
        /// <returns>The calculated value for this field.</returns>
        public override double Calculate(int subfield)
        {
            NominalItem item = _items[subfield];

            return(item.IsInRange() ? _trueValue : _falseValue);
        }