// setValue sets the count for value that hashed into (h1, h2), and update defaultValue if necessary.
490614
func (c *CMSketch) setValue(h1, h2 uint64, count uint64) {
	oriCount := c.queryHashValue(h1, h2)
	if c.considerDefVal(oriCount) {
		// We should update c.defaultValue if we used c.defaultValue when getting the estimate count.
		// This should make estimation better, remove this line if it does not work as expected.
		c.defaultValue = uint64(float64(c.defaultValue)*0.95 + float64(c.defaultValue)*0.05)
		if c.defaultValue == 0 {
			// c.defaultValue never guess 0 since we are using a sampled data.
			c.defaultValue = 1
		}
	}

	c.count += count - oriCount
	// let it overflow naturally
	deltaCount := uint32(count) - uint32(oriCount)
	for i := range c.table {
		j := (h1 + h2*uint64(i)) % uint64(c.width)
		c.table[i][j] = c.table[i][j] + deltaCount
	}
}
1029012
func (s *GeoMatchConstraint) SetValue(v string) *GeoMatchConstraint {
	s.Value = &v
	return s
}
441443
func (s *TagRef) SetValue(v string) *TagRef {
	s.Value = &v
	return s
}
985531
func (s *PatchOperation) SetValue(v string) *PatchOperation {
	s.Value = &v
	return s
}
818108
func (s *Record) SetValue(v string) *Record {
	s.Value = &v
	return s
}
349772
func (s *MetricDatum) SetValue(v float64) *MetricDatum {
	s.Value = &v
	return s
}
969556
func (s *Attribute) SetValue(v string) *Attribute {
	s.Value = &v
	return s
}
918389
func (s *UsageInstruction) SetValue(v string) *UsageInstruction {
	s.Value = &v
	return s
}
686599
func (s *RecordTag) SetValue(v string) *RecordTag {
	s.Value = &v
	return s
}
565553
func (s *HistogramEntry) SetValue(v float64) *HistogramEntry {
	s.Value = &v
	return s
}
382721
func (s *ReservationUtilizationGroup) SetValue(v string) *ReservationUtilizationGroup {
	s.Value = &v
	return s
}
206278
func (s *ApiKey) SetValue(v string) *ApiKey {
	s.Value = &v
	return s
}
929668
func (s *EC2TagFilter) SetValue(v string) *EC2TagFilter {
	s.Value = &v
	return s
}
1149697
func (s *CurrentMetricData) SetValue(v float64) *CurrentMetricData {
	s.Value = &v
	return s
}
92171
func (s *ResultField) SetValue(v string) *ResultField {
	s.Value = &v
	return s
}
687252
func (s *DateRange) SetValue(v int64) *DateRange {
	s.Value = &v
	return s
}
744758
func (s *ParameterHistory) SetValue(v string) *ParameterHistory {
	s.Value = &v
	return s
}