/// <summary>
 /// Reset the logic table.
 /// </summary>
 public void Reset()
 {
     if (_table == null)
     {
         _table = new BayesianTable(this);
     }
     _table.Reset();
 }
        /// <summary>
        /// Finalize the structure.
        /// </summary>
        public void FinalizeStructure()
        {
            // find min/max choice
            _minimumChoiceIndex = -1;
            _minimumChoice = Double.PositiveInfinity;
            _maximumChoice = Double.NegativeInfinity;

            int index = 0;
            foreach (BayesianChoice choice in _choices)
            {
                if (choice.Min < _minimumChoice)
                {
                    _minimumChoice = choice.Min;
                    _minimumChoiceIndex = index;
                }
                if (choice.Max > _maximumChoice)
                {
                    _maximumChoice = choice.Max;
                }
                index++;
            }

            // build truth table
            if (_table == null)
            {
                _table = new BayesianTable(this);
                _table.Reset();
            }
            else
            {
                _table.Reset();
            }
        }