public IEnumerable <string> SaveMseCalculations(Group group, string args) { var bag = new ConcurrentBag <string>(); Parallel.ForEach( group.People, person => { if (String.IsNullOrEmpty(args)) { var calculationService = new PersonCalculationService(); calculationService.CalculateSnapshots(person); var lenght = person.Snapshots.Data.Count(); var builder = new MseArgumentBuilder(); args = builder .WithMaxStopIndex(lenght - 1) .Build(); } string toFilePath = String.Concat(person.Id, "MseResult", ".txt"); string output = _personService.SaveMseCalculations(person, null, args); bag.Add(output); } ); return(bag.AsEnumerable()); }
public PersonService() { calculationService = new PersonCalculationService(); snapService = new IntervalSnapshotsService(); entropyService = new EntropyResultService(); compRateService = new CompressionRatesService(); recordService = new RecordService <Record>(); correlationService = new AutocorrelationService(); }
public GroupService() { _personService = new PersonService(); _personCalcService = new PersonCalculationService(); _correlationService = new AutocorrelationService(); }