public LightningStrikes_Basic(IEnumerable <BaseStrikeChina> _lightningStrikes_China, IStrikesDistributionStatisticService _iStrikesDistributionStatisticService) { IStrikesDistributionStatisticService = _iStrikesDistributionStatisticService; foreach (var tmpStrike in _lightningStrikes_China) { Strikes.Add(tmpStrike); } }
public Form1() { InitializeComponent(); SrcFileLoadCompleted += Form1_srcFileLoadCompleted; strikes = ReadDataAsync().Result; lightningPictureDrawer = new LightningPictureDrawer(); iStrikesDistributionStatisticService = new StrikesDistributionStatisticService(); baseDirectory = AppDomain.CurrentDomain.BaseDirectory + @"Results\"; }
public LightningStrikes_Standard(IEnumerable <LightningStrikeChina> _strikes_China, IStrikesDistributionStatisticService _iStrikesDistributionStatisticService) { IStrikesDistributionStatisticService = _iStrikesDistributionStatisticService; Strikes = new ConcurrentBag <BaseStrikeStandard>(); foreach (var tmpStrike in _strikes_China) { Strikes.Add(tmpStrike); } CalcuIntensity(); }
/// <summary> /// 计算总闪击、总正闪、总负闪、平均强度正闪、平均强度负闪、强度平均绝对值 /// </summary> private void CalcuIntensity() { if (IStrikesDistributionStatisticService != null) { SumNumPositive = IStrikesDistributionStatisticService.CalcuPositiveSumNum(Strikes); SumNumNegative = IStrikesDistributionStatisticService.CalcuPositiveSumNum(Strikes); IntensityPositiveAvg = IStrikesDistributionStatisticService.CalcuPositiveAvgIntensity(Strikes); IntensityNegativeAvg = IStrikesDistributionStatisticService.CalcuNegativeAvgIntensity(Strikes); IntensityAvg = IStrikesDistributionStatisticService.CalcuAbsAvgIntensity(Strikes); } }
/// <summary> /// 统计本类目下所有相关属性,耗时操作 /// </summary> public override void CalcuDistribution(string _areaName) { if (Strikes.Any() & IStrikesDistributionStatisticService != null) { //年分布 YearDistribution = IStrikesDistributionStatisticService.CalcuYearDistribution(Strikes); YearDistributionPositive = IStrikesDistributionStatisticService.CalcuYearDistributionPositive(Strikes); YearDistributionNegative = IStrikesDistributionStatisticService.CalcuYearDistributionNegative(Strikes); YearDistributionDesc = IStrikesDistributionStatisticService.GenerateYearDistributionText(Strikes); //月分布 MonthDistribution = IStrikesDistributionStatisticService.CalcuMonthDistribution(Strikes); MonthDistributionPositive = IStrikesDistributionStatisticService.CalcuMonthDistributionPosive(Strikes); MonthDistributionNegative = IStrikesDistributionStatisticService.CalcuMonthDistributionNegative(Strikes); MonthDistributionDesc = IStrikesDistributionStatisticService.GenerateMonthDistributionText(Strikes); //时分布 HourDistribution = IStrikesDistributionStatisticService.CalcuHourDistribution(Strikes); HourDistributionPositive = IStrikesDistributionStatisticService.CalcuHourDistribution_Positive(Strikes); HourDistributionNegative = IStrikesDistributionStatisticService.CalcuHourDistribution_Negative(Strikes); HourDistributionDesc = IStrikesDistributionStatisticService.GenerateHourDistributionText(Strikes); //统计各类总数 SumStrikesNum = IStrikesDistributionStatisticService.CalcuSumNum(Strikes); SumNumPositive = IStrikesDistributionStatisticService.CalcuPositiveSumNum(Strikes); SumNumNegative = IStrikesDistributionStatisticService.CalcuNegativeSumNum(Strikes); MinNegativeIntensity = IStrikesDistributionStatisticService.CalcuMinNegativeIntensity(Strikes); MaxNegativeIntensity = IStrikesDistributionStatisticService.CalcuMaxNegativeIntensity(Strikes); MinPositiveIntensity = IStrikesDistributionStatisticService.CalcuMinPositiveIntensity(Strikes); MaxPositiveIntensity = IStrikesDistributionStatisticService.CalcuMaxPositiveIntensity(Strikes); // 雷电流强度 IntensityAvg = IStrikesDistributionStatisticService.CalcuAbsAvgIntensity(Strikes); IntensityPositiveAvg = IStrikesDistributionStatisticService.CalcuPositiveAvgIntensity(Strikes); IntensityNegativeAvg = IStrikesDistributionStatisticService.CalcuNegativeAvgIntensity(Strikes); //yearList YearList = IStrikesDistributionStatisticService.CalcuYearList(Strikes); //雷电流累计概率分布 ProbabilityDistribution = IStrikesDistributionStatisticService.CalcuProbabilityDistribution(Strikes); ProbabilityDistributioDisc = IStrikesDistributionStatisticService.GenerateProbabilityDistributionText(Strikes); //雷电日 LightningStrikeDays = IStrikesDistributionStatisticService.GetLightningStrikesDays(Strikes, _areaName); } }
/// <summary> /// 统计本类目下所有相关属性,耗时操作 /// </summary> public override void CalcuDistribution(string _areaName) { if (Strikes.Any() & IStrikesDistributionStatisticService != null) { //年分布 YearDistribution = IStrikesDistributionStatisticService.CalcuYearDistribution(Strikes); YearDistributionDesc = IStrikesDistributionStatisticService.GenerateYearDistributionText(Strikes); //月分布 MonthDistribution = IStrikesDistributionStatisticService.CalcuMonthDistribution(Strikes); MonthDistributionDesc = IStrikesDistributionStatisticService.GenerateMonthDistributionText(Strikes); //时分布 HourDistribution = IStrikesDistributionStatisticService.CalcuHourDistribution(Strikes); HourDistributionDesc = IStrikesDistributionStatisticService.GenerateHourDistributionText(Strikes); //统计各类总数 SumStrikesNum = IStrikesDistributionStatisticService.CalcuSumNum(Strikes); //yearList YearList = IStrikesDistributionStatisticService.CalcuYearList(Strikes); //雷电日 LightningStrikeDays = IStrikesDistributionStatisticService.GetLightningStrikesDays(Strikes, _areaName); } }
public LightningStrikes_Basic(IStrikesDistributionStatisticService _iStrikesDistributionStatisticService) { IStrikesDistributionStatisticService = _iStrikesDistributionStatisticService; }
/// <summary> /// 统计雷电流强度累计概率分布 /// </summary> /// <returns></returns> public override Dictionary <int, double> CalcuProbabilityDistribution() { ProbabilityDistribution = IStrikesDistributionStatisticService.CalcuProbabilityDistribution(Strikes); return(ProbabilityDistribution); }
public LightningStrikes_Standard(IStrikesDistributionStatisticService _iStrikesDistributionStatisticService) { IStrikesDistributionStatisticService = _iStrikesDistributionStatisticService; Strikes = new ConcurrentBag <BaseStrikeStandard>(); }