Esempio n. 1
0
        public static Classificator Create(IReadOnlyList <Func <CurveBaseInfo, bool> > conditions)
        {
            conditions = conditions.Reverse().ToArray();
            ClassifyingItem chain = null;

            for (var i = 0; i < conditions.Count; i++)
            {
                var curveClass = new CurveClass()
                {
                    ClassNumber = conditions.Count - i
                };
                chain = new ClassifyingItem(chain, conditions[i], curveClass);
            }

            return(new Classificator(chain));
        }
Esempio n. 2
0
 public ClassifyingItem(ClassifyingItem next, Func <CurveBaseInfo, bool> classifyFunc, CurveClass curveClass)
 {
     _next         = next;
     _classifyFunc = classifyFunc;
     _curveClass   = curveClass;
 }
 public Classificator(ClassifyingItem classifyingItem)
 {
     ClassifyingItem = classifyingItem;
 }