コード例 #1
0
 public virtual void SwapSimulations(ISimulation oldSimulation, ISimulation newSimulation)
 {
     AllOutputMappings.Where(x => x.UsesSimulation(oldSimulation)).Each(outputMapping => outputMapping.UpdateSimulation(newSimulation));
     AllIdentificationParameters.Each(identificationParameter => identificationParameter.SwapSimulation(oldSimulation, newSimulation));
     _allSimulations.Remove(oldSimulation);
     _allSimulations.Add(newSimulation);
 }
コード例 #2
0
 public virtual void SwapSimulations(ISimulation oldSimulation, ISimulation newSimulation)
 {
     //Use ToList() here as the collection might be modified as we iterate
     AllOutputMappings.Where(x => x.UsesSimulation(oldSimulation)).ToList().Each(x => x.UpdateSimulation(newSimulation));
     AllIdentificationParameters.Each(identificationParameter => identificationParameter.SwapSimulation(oldSimulation, newSimulation));
     _allSimulations.Remove(oldSimulation);
     _allSimulations.Add(newSimulation);
 }
コード例 #3
0
 public virtual IEnumerable <DataColumn> AllObservationColumnsFor(string fullOutputPath)
 {
     return(AllOutputMappings.Where(x => string.Equals(x.FullOutputPath, fullOutputPath))
            .SelectMany(x => x.WeightedObservedData.ObservedData.ObservationColumns()));
 }