예제 #1
0
 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.
 }
예제 #2
0
            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;
                }
            }
예제 #3
0
 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.
 }
예제 #4
0
            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;
                }
            }