Пример #1
0
        public static Year operator +(Year c1, Year c2)
        {
            Year res = new Year();
            res.year = c1.year;

            for (int i = 0; i < c1.months.Count && i < c2.months.Count; i++)
                res.addMonth(c1.months[i] + c2.months[i]);

            return res;
        }
Пример #2
0
        private Year calculateMetric(int year, ClassLine class_data, bool t_left_side)
        {
            Year year_data = new Year();
            year_data.year = year;

            for (int i = 0; i < 12; i++)
            {
                Double month = -class_data.values[i + 1] + class_data.values[i + 17]; //- CR + DB
                year_data.addMonth(month);
            }
            return year_data;
        }