//восстановление сигналов и шума из old... public void AfterMagic() { Signal.Clear(); Noise.Clear(); OriginalSignal.Clear(); OriginalNoise.Clear(); foreach (double item in oldSignal) { Signal.Add(item); } foreach (double item in oldNoise) { Noise.Add(item); } foreach (double item in oldOriginalSignal) { OriginalSignal.Add(item); } foreach (double item in oldOriginalNoise) { OriginalNoise.Add(item); } }
//модификация оригинальных сигналов псевдо-+случайным образом public void MagicOn() { List <double> result = new List <double>(); foreach (double item in OriginalSignal) { result.Add(item + _Random.NextDouble() * Magic - _Random.NextDouble() * Magic); } OriginalSignal.Clear(); foreach (double item in result) { OriginalSignal.Add(item); } result.Clear(); foreach (double item in OriginalNoise) { result.Add(item + _Random.NextDouble() * Magic - _Random.NextDouble() * Magic); } OriginalNoise.Clear(); foreach (double item in result) { OriginalNoise.Add(item); } Computer(); }
public void SignalClear() { Signal.Clear(); OriginalSignal.Clear(); }