private void calculateLimitsFor(IPopulationDataCollector populationDataCollector)
        {
            //limits only needs to be generated for bin grouping information
            var binsGroupingDefinition = GroupingDefinition as BinsGroupingDefinition;

            if (binsGroupingDefinition == null)
            {
                return;
            }

            var numericField = PopulationAnalysis.FieldByName(GroupingDefinition.FieldName).DowncastTo <PopulationAnalysisNumericField>();

            binsGroupingDefinition.CreateLimits(populationDataCollector, numericField);
        }
        public override bool IsDerivedTypeFor(Type fieldType)
        {
            var field = PopulationAnalysis.FieldByName(GroupingDefinition.FieldName);

            if (field == null)
            {
                return(false);
            }

            var derivedField = field as PopulationAnalysisDerivedField;

            if (derivedField != null)
            {
                return(derivedField.IsDerivedTypeFor(fieldType));
            }

            return(field.IsAnImplementationOf(fieldType));
        }
 public PopulationAnalysisSnapshotContext(ModelPopulationAnalysis populationAnalysis, SnapshotContext baseContext) : base(baseContext)
 {
     PopulationAnalysis = populationAnalysis;
 }