internal static bool Parse(string val, out SufficientStatistics result)
        {
            double valAsDouble;

            if (double.TryParse(val, out valAsDouble))
            {
                result = ContinuousStatistics.GetInstance(valAsDouble);
                return(true);
            }
            else
            {
                result = null;
                return(false);
            }
        }
        public static SufficientStatistics Parse(string val)
        {
            SufficientStatistics result;

            if (
                MissingStatistics.Parse(val, out result) ||
                GaussianStatistics.Parse(val, out result) ||
                BooleanStatistics.Parse(val, out result) ||
                DiscreteStatistics.Parse(val, out result) ||
                ContinuousStatistics.Parse(val, out result))
            {
                return(result);
            }
            throw new ArgumentException(string.Format("Unable to parse {0} into an instance of ISufficientStatistics", val));
        }
        public override bool Equals(object obj)
        {
            if (IsMissing() && obj is SufficientStatistics && ((SufficientStatistics)obj).IsMissing())
            {
                return(true);
            }
            ContinuousStatistics asContStat = obj as ContinuousStatistics;

            if (asContStat == null)
            {
                DiscreteStatistics asDiscStat = obj as DiscreteStatistics;
                if (asDiscStat == null)
                {
                    return(false);
                }
                else
                {
                    return(asDiscStat.Class == this.Value);
                }
            }

            return(this.Value == asContStat.Value);
        }