Esempio n. 1
0
        public Flou x(Double val)
        {
            if (val <= minInterval)
            {
                return(new Flou(minIntervalValue));
            }
            if (val >= maxInterval)
            {
                return(new Flou(maxIntervalValue));
            }

            for (int i = 1; i < this.nbPointsInArray; i++)
            {
                if (val < this.points[i, 0])
                {
                    return(new Flou(Flou.extrapolate(this.points[i - 1, 0], this.points[i - 1, 1], this.points[i, 0], this.points[i, 1], val)));
                }
            }
            throw new Exception("Internal error");
        }
Esempio n. 2
0
        static public void findStabilityAndAddValueToList(List <Double> listUsedToFindStability, List <Double> stabilityListToBeModified, int sizeOfStabilityList)
        {
            //start with max over 5 values
            if (listUsedToFindStability.Count <= 5)
            {
                ToolBox.insertInListWithMax(stabilityListToBeModified, 0, sizeOfStabilityList);
                return;
            }

            List <Double> compareList = new List <Double>();

            for (int i = 0; i < 5; i++)
            {
                compareList.Add(Math.Abs(listUsedToFindStability[i] - listUsedToFindStability[i + 1]));
            }

            Flou result = new Flou(BusinessConf.isExtremelySmall.x(compareList.Max()));

            ToolBox.insertInListWithMax(stabilityListToBeModified, result.y, sizeOfStabilityList);
        }
Esempio n. 3
0
 public Flou(Flou f)
 {
     this.y = f.y;
 }