public Cycle(Cycle other) { CycleScore = other.CycleScore; Repeats = other.Repeats; MinDistance = other.MinDistance; _windows = new int[other._windows.Length]; other._windows.CopyTo(_windows, 0); _windowsPerScan = other._windowsPerScan; _pairingHistory = other._pairingHistory; // Copy shares PairingHistory with other. }
public Cycle(int windowCount, int windowsPerScan) { CycleScore = double.MaxValue; _ordering = new int[windowCount]; _windows = new int[windowCount]; int scansPerCycle = windowCount / windowsPerScan; _scans = new int[scansPerCycle]; _nextWindowInScan = new int[scansPerCycle]; _windowsPerScan = windowsPerScan; _pairingHistory = new PairingHistory(windowCount); _random = new Random(0); // Fixed seed for repeatable results. for (int i = 0; i < _ordering.Length; i++) { _ordering[i] = i; } }
public Cycle(Cycle other) { CycleScore = other.CycleScore; Repeats = other.Repeats; MinDistance = other.MinDistance; _windows = new int[other._windows.Length]; other._windows.CopyTo(_windows, 0); _windowsPerScan = other._windowsPerScan; _pairingHistory = other._pairingHistory; // Copy shares PairingHistory with other. }
public Cycle(int windowCount, int windowsPerScan) { CycleScore = double.MaxValue; _ordering = new int[windowCount]; _windows = new int[windowCount]; int scansPerCycle = windowCount / windowsPerScan; _scans = new int[scansPerCycle]; _nextWindowInScan = new int[scansPerCycle]; _windowsPerScan = windowsPerScan; _pairingHistory = new PairingHistory(windowCount); _random = new Random(0); // Fixed seed for repeatable results. for (int i = 0; i < _ordering.Length; i++) { _ordering[i] = i; } }