Exemplo n.º 1
0
        public ScheduleCompleter(List <Group> state, List <Teacher> teachers, List <Tuple <SuperGroup, int> > supergroupMultilessons, int maxLessons)
        {
            this.state                  = state;
            this.teachers               = teachers;
            this.maxLessons             = maxLessons;
            this.supergroupMultilessons = compressSGMultilesons(supergroupMultilessons.Select(x => Tuple.Create(x.Item1.Clone(), x.Item2)).ToList());

            this.baseConfig = new ConfigurationState(this.state, this.teachers, this.supergroupMultilessons, true, this.maxLessons);
        }
Exemplo n.º 2
0
        public ConfigurationState(ConfigurationState other) : base(other)
        {
            this.teacherLeftLessons = new int[other.teacherLeftLessons.GetLength(0)];
            Array.Copy(other.teacherLeftLessons, this.teacherLeftLessons, other.teacherLeftLessons.Length);

            this.options = other.options;

            this.solution = new List <Tuple <int, Subject> > [other.solution.GetLength(0)];
            Array.Copy(other.solution, this.solution, other.solution.Length);
        }