public void CalcClassGain(double _gain) { TypeSize ts = ParAll.ST.TSSet.Current; if (Tp == EUnit.Line) { TSLine tsl = ParAll.CTS.Line; Class = EClass.None; foreach (Meas m in MMeas) { m.Class = Classer.GetDefClass(m.FilterABC * _gain, tsl.Borders, m.Dead); m.ClassIn = Classer.GetDefClass(m.FilterInABC * _gain, tsl.BordersIn, m.Dead); Class = Classer.Compare(Class, m.Class); } } else { TSCross tsc = ParAll.CTS.Cross; Class = EClass.None; foreach (Meas m in MMeas) { m.Class = Classer.GetDefClass(m.FilterABC * _gain, tsc.Borders, m.Dead); Class = Classer.Compare(Class, m.Class); } } }
//public void Load(double[] _zoneData, int _sensors) //{ // MSensor = new Sensor[_sensors]; // int lMeasLength = _zoneData.Length / _sensors; // if (lMeasLength * _sensors != _zoneData.Length) // throw new Exception("Zone.Load: массив данных не делится на количество сенсоров нацело"); // int point = 0; // for (int s = 0; s < MSensor.Length; s++) // MSensor[s] = new Sensor(type, MeasLength); // for (int im = 0; im < MeasLength; im++) // { // for (int s = 0; s < MSensor.Length; s++) // MSensor[s].MMeas[im].Source = _zoneData[point++]; // } //} public void Calc(Zone _prev) { Class = EClass.None; for (int s = 0; s < MSensor.Count(); s++) { MSensor[s].Calc(s, _prev == null ? null : _prev.MSensor[s]); Class = Classer.Compare(Class, MSensor[s].Class); } }
public void CalcClassGain(double[] _gains) { Class = EClass.None; for (int s = 0; s < MSensor.Count(); s++) { MSensor[s].CalcClassGain(_gains[s]); Class = Classer.Compare(Class, MSensor[s].Class); } }