/// <summary> /// Determine which item's index is the value. /// </summary> public override void RowInit() { for (int i = 0; i < this.items.Count; i++) { NominalItem item = this.items[i]; if (item.IsInRange()) { this.currentValue = i; break; } } if (this.equilateral == null) { this.equilateral = new Equilateral(this.items.Count, this.high, this.low); } }
/// <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 = this.items[subfield]; return(item.IsInRange() ? this.trueValue : this.falseValue); }