//clone public override ZingerSchedulerState Clone(bool isCloneForFrontier) { RandomDBSchedulerState cloned = new RandomDBSchedulerState(this); if (isCloneForFrontier) { cloned.setOfProcesses = new List<int>(); foreach (var item in setOfProcesses) { cloned.setOfProcesses.Add(item); } } return cloned; }
//copy constructor public RandomDBSchedulerState(RandomDBSchedulerState copyThis) : base(copyThis) { randGen = copyThis.randGen; scheculedProcess = copyThis.scheculedProcess; setOfProcesses = new List<int>(); EnabledProcesses = new List<int>(); foreach (var item in copyThis.EnabledProcesses) { setOfProcesses.Add(item); EnabledProcesses.Add(item); } }