// Scale multiplies all values in the slice by the scalar and then increments the incr slice
// 		incr += a̅ * s
769936
func IncrScale(a []float64, s float64, incr []float64) {
	incr = incr[:len(a)]
	for i, v := range a {
		incr[i] += v * s
	}
}
1054681
func (a int64Amount) AsScale(scale Scale) (int64Amount, bool) {
	if a.scale >= scale {
		return a, true
	}
	result, exact := negativeScaleInt64(a.value, scale-a.scale)
	return int64Amount{value: result, scale: scale}, exact
}
634551
func (a *ReplaySnapshotArgs) SetScale(scale float64) *ReplaySnapshotArgs {
	a.Scale = &scale
	return a
}
973624
func (a infDecAmount) AsScale(scale Scale) (infDecAmount, bool) {
	tmp := &inf.Dec{}
	tmp.Round(a.Dec, scale.infScale(), inf.RoundUp)
	return infDecAmount{tmp}, tmp.Cmp(a.Dec) == 0
}
653696
func (s *ColumnInfo) SetScale(v int64) *ColumnInfo {
	s.Scale = &v
	return s
}
1058467
func Scale(c *client.Client, appID string, targets map[string]int) error {
	u := fmt.Sprintf("/v1/apps/%s/scale/", appID)

	body, err := json.Marshal(targets)

	if err != nil {
		return err
	}

	_, err = c.BasicRequest("POST", u, body)
	return err
}
380225
func (mat *T) Scale(f float32) *T {
	mat[0][0] *= f
	mat[1][1] *= f
	mat[2][2] *= f
	return mat
}
369522
func Scale(targets []string, b backend.Backend) error {
	var wg sync.WaitGroup

	for _, target := range targets {
		component, num, err := splitScaleTarget(target)
		if err != nil {
			return err
		}
		// the router, registry, and store-gateway are the only component that can scale at the moment
		if !strings.Contains(component, "router") && !strings.Contains(component, "registry") && !strings.Contains(component, "store-gateway") {
			return fmt.Errorf("cannot scale %s component", component)
		}
		b.Scale(component, num, &wg, Stdout, Stderr)
		wg.Wait()
	}
	return nil
}
764275
func Scale(dst draw.Image, src image.Image) error {
	if dst == nil {
		return errors.New("graphics: dst is nil")
	}
	if src == nil {
		return errors.New("graphics: src is nil")
	}

	b := dst.Bounds()
	srcb := src.Bounds()
	if b.Empty() || srcb.Empty() {
		return nil
	}
	sx := float64(b.Dx()) / float64(srcb.Dx())
	sy := float64(b.Dy()) / float64(srcb.Dy())
	return I.Scale(sx, sy).Transform(dst, src, interp.Bilinear)
}
1165382
func (s *TaskSet) SetScale(v *Scale) *TaskSet {
	s.Scale = v
	return s
}
451891
func Scale(bc Barcode, width, height int) (Barcode, error) {
	switch bc.Metadata().Dimensions {
	case 1:
		return scale1DCode(bc, width, height)
	case 2:
		return scale2DCode(bc, width, height)
	}

	return nil, errors.New("unsupported barcode format")
}
1134246
func Scale(c *deis.Client, appID string, targets map[string]int) error {
	u := fmt.Sprintf("/v2/apps/%s/scale/", appID)

	body, err := json.Marshal(targets)

	if err != nil {
		return err
	}

	res, err := c.Request("POST", u, body)
	if err == nil {
		return res.Body.Close()
	}
	return err
}
1324377
func IncrScaleInv(a []float64, s float64, incr []float64) {
	IncrScale(a, 1/s, incr)
}
331849
func (h Histogram) Scale(s ScaleFunc, idx int) float64 {
	bkt := h.Buckets[idx]
	scale := s(h.Min, h.Max, bkt.Count)
	return scale
}
1100969
func (q *Quantity) ScaledValue(scale Scale) int64 {
	if q.Amount == nil {
		return 0
	}
	return scaledValue(q.Amount.UnscaledBig(), int(q.Amount.Scale()), int(scale.infScale()))
}
611559
func (e *EmptyService) Scale(ctx context.Context, count int, timeout int) error {
	return nil
}
811229
func (m *Matrix) Multiply(m2 *Matrix) *Matrix {
	multiplyMatricies(m.Val[:], m2.Val[:])
	return m
}