// RadialIndexMap is similar to Radial but returns an array that maps
// each new path index to its original path index.
// Returns a new path and DOES NOT modify the original.
486876
func RadialIndexMap(path *geo.Path, meters float64) (*geo.Path, []int) {
	return radialCore(path, meters*meters, squaredDistance, true)
}
216576
func (arguments Arguments) NonIndexed() Arguments {
	var ret []Argument
	for _, arg := range arguments {
		if !arg.Indexed {
			ret = append(ret, arg)
		}
	}
	return ret
}
1322014
func (s *GlobalStore) nodeIndex(addr common.Address) (index int, found bool) {
	l := len(s.nodes)
	index = sort.Search(l, func(i int) bool {
		return bytes.Compare(s.nodes[i][:], addr[:]) >= 0
	})
	found = index < l && bytes.Equal(s.nodes[index][:], addr[:])
	return index, found
}
737598
func (c *Storage) TrackIndexedDBForOriginWithParams(v *StorageTrackIndexedDBForOriginParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Storage.trackIndexedDBForOrigin", Params: v})
}
39778
func NewIndex() *Index {
	return &Index{lines: map[string]string{}, charts: map[string]*repo.ChartVersion{}}
}
803412
func (res RPCResponses) AsMap() map[int]*RPCResponse {
	resMap := make(map[int]*RPCResponse, 0)
	for _, r := range res {
		resMap[r.ID] = r
	}

	return resMap
}
1232713
func (t TreePalette) IndexNear(c color.Color) (i int) {
	if t.Root == nil {
		return -1
	}
	t.Search(c, func(leaf *Node) { i = leaf.Index })
	return
}
861803
func GetVertexAttribIiv(index uint32, pname uint32, params *int32) {
	C.glowGetVertexAttribIiv(gpGetVertexAttribIiv, (C.GLuint)(index), (C.GLenum)(pname), (*C.GLint)(unsafe.Pointer(params)))
}
1127403
func MapRemoveByIndexOp(binName string, index int, returnType mapReturnType) *Operation {
	return newCDTCreateOperationValue1(_CDT_MAP_REMOVE_BY_INDEX, _MAP_MODIFY, binName, index, returnType)
}
782896
func (t *TableMap) IdxMap(field string) *IndexMap {
	for _, idx := range t.indexes {
		if idx.IndexName == field {
			return idx
		}
	}
	return nil
}
40763
func DistanceFromWithIndex(g orb.Geometry, p orb.Point) (float64, int) {
	if g == nil {
		return math.Inf(1), -1
	}

	switch g := g.(type) {
	case orb.Point:
		return Distance(g, p), 0
	case orb.MultiPoint:
		return multiPointDistanceFrom(g, p)
	case orb.LineString:
		return lineStringDistanceFrom(g, p)
	case orb.MultiLineString:
		dist := math.Inf(1)
		index := -1
		for i, ls := range g {
			if d, _ := lineStringDistanceFrom(ls, p); d < dist {
				dist = d
				index = i
			}
		}

		return dist, index
	case orb.Ring:
		return lineStringDistanceFrom(orb.LineString(g), p)
	case orb.Polygon:
		return polygonDistanceFrom(g, p)
	case orb.MultiPolygon:
		dist := math.Inf(1)
		index := -1
		for i, poly := range g {
			if d, _ := polygonDistanceFrom(poly, p); d < dist {
				dist = d
				index = i
			}
		}

		return dist, index
	case orb.Collection:
		dist := math.Inf(1)
		index := -1
		for i, ge := range g {
			if d, _ := DistanceFromWithIndex(ge, p); d < dist {
				dist = d
				index = i
			}
		}

		return dist, index
	case orb.Bound:
		return DistanceFromWithIndex(g.ToRing(), p)
	}

	panic(fmt.Sprintf("geometry type not supported: %T", g))
}
415678
func NewReindexer(client *Client, source string, reindexerFunc ReindexerFunc) *Reindexer {
	return &Reindexer{
		sourceClient:  client,
		sourceIndex:   source,
		reindexerFunc: reindexerFunc,
		statsOnly:     true,
	}
}
889024
func (l Listing) BreadcrumbMap() map[string]string {
	result := map[string]string{}

	if len(l.Path) == 0 {
		return result
	}

	// skip trailing slash
	lpath := l.Path
	if lpath[len(lpath)-1] == '/' {
		lpath = lpath[:len(lpath)-1]
	}

	parts := strings.Split(lpath, "/")
	for i, part := range parts {
		if i == 0 && part == "" {
			// Leading slash (root)
			result["/"] = "/"
			continue
		}
		result[strings.Join(parts[:i+1], "/")] = part
	}

	return result
}
400650
func Nub(v T) T {
	rv := reflectSlice(v)
	indexes := make([]int, 0)
	set := reflect.MakeMap(reflect.MapOf(rv.Type().Elem(), trueVal.Type()))
	for i, l := 0, rv.Len(); i < l; i++ {
		x := rv.Index(i)
		if set.MapIndex(x).IsValid() {
			continue
		}
		set.SetMapIndex(x, trueVal)
		indexes = append(indexes, i)
	}
	return Select(v, indexes)
}
403763
func (c *Context) GetVertexAttrib(index, pname int) *js.Object {
	return c.Call("getVertexAttrib", index, pname)
}
305782
func NewIndicesPutMappingService(client *Client) *IndicesPutMappingService {
	return &IndicesPutMappingService{
		client: client,
		index:  make([]string, 0),
	}
}
1138569
func MapRemoveByIndexRangeOp(binName string, index int, returnType mapReturnType) *Operation {
	return newCDTCreateOperationValue1(_CDT_MAP_REMOVE_BY_INDEX_RANGE, _MAP_MODIFY, binName, index, returnType)
}