// SetAggregateComplianceCounts sets the AggregateComplianceCounts field's value.
764338
func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetAggregateComplianceCounts(v []*AggregateComplianceCount) *GetAggregateConfigRuleComplianceSummaryOutput {
	s.AggregateComplianceCounts = v
	return s
}
376200
func (s *ListResourceComplianceSummariesOutput) SetResourceComplianceSummaryItems(v []*ResourceComplianceSummaryItem) *ListResourceComplianceSummariesOutput {
	s.ResourceComplianceSummaryItems = v
	return s
}
167452
func (s *DescribeAggregateComplianceByConfigRulesInput) SetConfigurationAggregatorName(v string) *DescribeAggregateComplianceByConfigRulesInput {
	s.ConfigurationAggregatorName = &v
	return s
}
1147921
func Aggregate(stats []*stat.Stat) (aggregate StatsAggregate) {
	if stats == nil || len(stats) == 0 {
		return StatsAggregate{}
	}

	aggregate = StatsAggregate{Min : stats[0].Value, Max : stats[0].Value, Count : len(stats)}
	sum := 0.0
	for i := range stats {
		v := stats[i].Value

		sum += v

		if v < aggregate.Min {
			aggregate.Min = v
		}

		if v > aggregate.Max {
			aggregate.Max = v
		}
	}
	aggregate.Average = sum / float64(len(stats))

	return
}
320576
func (s *ManagedResourceSummary) SetAssociationCount(v int64) *ManagedResourceSummary {
	s.AssociationCount = &v
	return s
}
860976
public void setAggregateComplianceByConfigRules(java.util.Collection<AggregateComplianceByConfigRule> aggregateComplianceByConfigRules) {
        if (aggregateComplianceByConfigRules == null) {
            this.aggregateComplianceByConfigRules = null;
            return;
        }

        this.aggregateComplianceByConfigRules = new com.amazonaws.internal.SdkInternalList<AggregateComplianceByConfigRule>(aggregateComplianceByConfigRules);
    }
74052
func (s *AssociationOverview) SetAssociationStatusAggregatedCount(v map[string]*int64) *AssociationOverview {
	s.AssociationStatusAggregatedCount = v
	return s
}
716971
func (s *AutomationExecution) SetProgressCounters(v *ProgressCounters) *AutomationExecution {
	s.ProgressCounters = v
	return s
}
637902
func (s *InventoryAggregator) SetAggregators(v []*InventoryAggregator) *InventoryAggregator {
	s.Aggregators = v
	return s
}
1092273
func (s *GetComplianceSummaryByConfigRuleOutput) SetComplianceSummary(v *ComplianceSummary) *GetComplianceSummaryByConfigRuleOutput {
	s.ComplianceSummary = v
	return s
}
1271766
func (s *ComplianceSummaryByResourceType) SetComplianceSummary(v *ComplianceSummary) *ComplianceSummaryByResourceType {
	s.ComplianceSummary = v
	return s
}
75819
func (s *DBCluster) SetBacktrackConsumedChangeRecords(v int64) *DBCluster {
	s.BacktrackConsumedChangeRecords = &v
	return s
}
827861
func (s *GetAggregateConfigRuleComplianceSummaryInput) SetConfigurationAggregatorName(v string) *GetAggregateConfigRuleComplianceSummaryInput {
	s.ConfigurationAggregatorName = &v
	return s
}
314920
func (s *EventAggregate) SetAggregateValue(v string) *EventAggregate {
	s.AggregateValue = &v
	return s
}
933030
func AppendStatsAggregate(a, b StatsAggregate) (aggregate StatsAggregate) {
	if (a.Count == 0) {
		return b
	}

	if (b.Count == 0) {
		return a
	}

	aggregate.Average = ( (a.Average * float64(a.Count)) + (b.Average * float64(b.Count)) ) / float64(a.Count + b.Count)
	aggregate.Min     = math.Min(a.Min, b.Min)
	aggregate.Max     = math.Max(a.Max, b.Max)
	aggregate.Count   = a.Count + b.Count
	return
}
937024
func (r *RecordAccess) SubAggregateQuery(query *Query, groupBy ...string) ([]*AggregateResult, error) {
	return aggregateQuery(r.tx, r.record, query, groupBy...)
}
1174206
func (tc *TabletStatsCache) updateAggregateMap(keyspace, shard string, tabletType topodatapb.TabletType, e *tabletStatsCacheEntry, stats []*TabletStats) {
	// Save the new value
	e.aggregates = tc.makeAggregateMap(stats)
}