Пример #1
0
        public DiscreteFuzzySetBLL Discretize(ContinuousFuzzySetBLL ConFS, double StartPoint, double epsilon)
        {
            DiscreteFuzzySetBLL DiscFS = new DiscreteFuzzySetBLL();
            DiscFS.FuzzySetName = ConFS.FuzzySetName;
            DiscFS.FuzzySet = ConFS.FuzzySet;

            for (double value = StartPoint; value <= ConFS.Bottom_Right; value += epsilon)
            {
                double membership = ConFS.GetMembershipAt(value);
                DiscFS.AddPoint(value, membership);
            }

            return DiscFS;
        }
Пример #2
0
        private DiscreteFuzzySetBLL GetDataRows()
        {
            DiscreteFuzzySetBLL result = new DiscreteFuzzySetBLL();
            result.FuzzySetName = this.txtLinguistic.Text.Trim();

            for (int i = 0; i < gridView1.DataRowCount; i++)
            {
                result.AddPoint(Convert.ToDouble(gridView1.GetRowCellValue(i, "values").ToString()),
                                Convert.ToDouble(gridView1.GetRowCellValue(i, "memberships").ToString()));
            }

            return result;
        }