// Map maps from a value x in the source scale's input domain to a
// value y in the destination scale's input domain.
433042
func (q QQ) Map(x float64) float64 {
	return q.Dest.Unmap(q.Src.Map(x))
}
539328
func (n Headers) Map() (map[string]string, error) {
	m := make(map[string]string)
	err := json.Unmarshal(n, &m)
	return m, err
}
229784
func (lhu *LookupHashUnique) Map(vcursor VCursor, ids []sqltypes.Value) ([]key.Destination, error) {
	out := make([]key.Destination, 0, len(ids))
	if lhu.writeOnly {
		for range ids {
			out = append(out, key.DestinationKeyRange{KeyRange: &topodatapb.KeyRange{}})
		}
		return out, nil
	}

	results, err := lhu.lkp.Lookup(vcursor, ids)
	if err != nil {
		return nil, err
	}
	for i, result := range results {
		switch len(result.Rows) {
		case 0:
			out = append(out, key.DestinationNone{})
		case 1:
			num, err := sqltypes.ToUint64(result.Rows[0][0])
			if err != nil {
				out = append(out, key.DestinationNone{})
				continue
			}
			out = append(out, key.DestinationKeyspaceID(vhash(num)))
		default:
			return nil, fmt.Errorf("LookupHash.Map: unexpected multiple results from vindex %s: %v", lhu.lkp.Table, ids[i])
		}
	}
	return out, nil
}
560089
func (u Vec) Map(f func(float64) float64) Vec {
	return Vec{
		f(u.X),
		f(u.Y),
	}
}
996480
func (s StringSlice) Map() map[string]struct{} {
	m := map[string]struct{}{}
	for _, w := range s {
		m[w] = struct{}{}
	}
	return m
}
282944
func (mapper *Mapper) Map(tbl *lua.LTable, st interface{}) error {
	opt := mapper.Option
	mp, ok := ToGoValue(tbl, opt).(map[interface{}]interface{})
	if !ok {
		return errors.New("arguments #1 must be a table, but got an array")
	}
	config := &mapstructure.DecoderConfig{
		WeaklyTypedInput: true,
		Result:           st,
		TagName:          opt.TagName,
		ErrorUnused:      opt.ErrorUnused,
	}
	decoder, err := mapstructure.NewDecoder(config)
	if err != nil {
		return err
	}
	return decoder.Decode(mp)
}
1057950
func (r *Reply) Map() (map[string]string, error) {
	if r.IsNil() {
		return nil, ErrNil
	}
	if !r.IsArray() {
		return nil, ErrType
	}
	if len(r.arrayValue)%2 != 0 {
		return nil, ErrType
	}
	m := make(map[string]string)
	for i := 0; i < len(r.arrayValue)/2; i++ {
		first, err := r.arrayValue[2*i].String()
		if err != nil {
			continue
		}
		second, err := r.arrayValue[2*i+1].String()
		if err != nil && err != ErrNil {
			continue
		}
		m[first] = second
	}
	return m, nil
}
207832
func (polygon Polygon) Map() map[string]interface{} {
	result := make(map[string]interface{})
	result[COORDINATES] = polygon.Coordinates
	result[TYPE] = POLYGON
	return result
}
1294365
func Map(tbl *lua.LTable, st interface{}) error {
	return NewMapper(Option{}).Map(tbl, st)
}
736404
func (s Seq) Map(mapfn func(i int, v float64) float64) Seq {
	output := make([]float64, s.Len())
	for i := 0; i < s.Len(); i++ {
		mapfn(i, s.GetValue(i))
	}
	return Seq{Array(output)}
}
990383
func (oms *OnlyMapperStruct) Map(key, val sophie.SophieWriter,
	c []sophie.Collector) error {
	if oms.MapF != nil {
		return oms.MapF(key, val, c)
	}
	return nil
}
528384
func (pm *PortMapper) Map(container net.Addr, hostIP net.IP, hostPort int, useProxy bool) (host net.Addr, err error) {
	return pm.MapRange(container, hostIP, hostPort, hostPort, useProxy)
}
1210004
func (obj *object) Map(f func(*Term, *Term) (*Term, *Term, error)) (Object, error) {
	cpy := newobject(obj.Len())
	err := obj.Iter(func(k, v *Term) error {
		var err error
		k, v, err = f(k, v)
		if err != nil {
			return err
		}
		cpy.insert(k, v)
		return nil
	})
	if err != nil {
		return nil, err
	}
	return cpy, nil
}
1123444
func Map(args ...cty.Value) (cty.Value, error) {
	return MapFunc.Call(args)
}
141612
func (feature *Feature) Map() map[string]interface{} {
	result := make(map[string]interface{})
	switch ft := feature.Geometry.(type) {
	case Mapper:
		result[GEOMETRY] = ft.Map()
	case map[string]interface{}:
		result[GEOMETRY] = ft
	default:
		result[GEOMETRY] = nil
	}
	result[PROPERTIES] = feature.Properties
	result[TYPE] = FEATURE
	result[ID] = feature.ID
	return result
}
629477
func (f *Feed) Map(bytes []byte) error {
	return json.Unmarshal(bytes, f)
}
500546
func (vind *Null) Map(cursor VCursor, ids []sqltypes.Value) ([]key.Destination, error) {
	out := make([]key.Destination, 0, len(ids))
	for i := 0; i < len(ids); i++ {
		out = append(out, key.DestinationKeyspaceID(nullksid))
	}
	return out, nil
}