// Len returns the length of the vector.
496889
func (v Vector) Len() float64 {
	return math.Sqrt(v.x*v.x + v.y*v.y)
}
1294686
func (c *Cache) Len() int {
	l := 0
	for _, s := range c.shards {
		l += s.Len()
	}
	return l
}
1177138
func (c *Cache) Len() int {
	if c.cache == nil {
		return 0
	}
	return c.ll.Len()
}
1141459
func (n *rootNode) Len() int {
	switch n.Type() {
	case TypeString:
		return len(string(n.buf)) - 2 // subtact the 2 " marks
	case TypeArray:
		vslice := []*rootNode{}
		n.Unmarshal(&vslice)
		return len(vslice)
	}
	// default return -1 (for type mismatch)
	return -1
}
25035
func (c *CMap) Len() int {
	c.mutex.RLock()
	defer c.mutex.RUnlock()
	return len(c.items)
}
409750
func Len(val Value) (int, error) {
	if val == nil {
		return 0, nil
	}
	r := reflect.Indirect(reflect.ValueOf(val))
	switch r.Kind() {
	case reflect.Slice, reflect.Array, reflect.Map:
		return r.Len(), nil
	}
	return 0, fmt.Errorf(`stick: could not get length of %s "%v"`, r.Kind(), val)
}
532679
func (in *inode) Len() (n int) {
	for _, e := range in.entries {
		if e.Type != fuseutil.DT_Unknown {
			n++
		}
	}

	return
}
1001325
func (lg Linear) Len() int {
	if lg.start < lg.end {
		return int((lg.end-lg.start)/lg.step) + 1
	}
	return int((lg.start-lg.end)/lg.step) + 1
}
662784
func (b *PCMBuffer) Len() int {
	if b == nil {
		return 0
	}

	switch b.DataType {
	case Integer:
		return len(b.Ints)
	case Float:
		return len(b.Floats)
	case Byte:
		return len(b.Bytes)
	default:
		return 0
	}
}
923121
func (p *Prefix) Len() (length int) {
	length = len(p.Name)
	if len(p.User) > 0 {
		length = length + len(p.User) + 1
	}
	if len(p.Host) > 0 {
		length = length + len(p.Host) + 1
	}
	return
}
1067714
func (c *Cache) Len() int {
	c.Lock()
	defer c.Unlock()
	return c.l.Len()
}
1272768
func Len(v int64) int {
	u := uint64(v)
	switch {
	case u < 0x80:
		return 1
	case u < 0x4000:
		return 2
	case u < 0x200000:
		return 3
	case u < 0x10000000:
		return 4
	case u < 0x800000000:
		return 5
	case u < 0x40000000000:
		return 6
	case u < 0x2000000000000:
		return 7
	case u < 0x100000000000000:
		return 8
	default:
		return 9
	}
}
1249740
func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool {
	if h, ok := a.t.(tHelper); ok {
		h.Helper()
	}
	return Len(a.t, object, length, msgAndArgs...)
}
1331417
func (e *EndpointSet) Len() int {
	e.mutex.RLock()
	defer e.mutex.RUnlock()
	return len(e.endpoints)
}
1350469
func (ps *peerSet) Len() int {
	ps.lock.RLock()
	defer ps.lock.RUnlock()

	return len(ps.peers)
}
51334
func (vn *VecN) Len() float32 {
	if vn == nil {
		return float32(math.NaN())
	}
	if len(vn.vec) == 0 {
		return 0
	}

	return float32(math.Sqrt(float64(vn.Dot(vn))))
}
453404
func (prs PolynomialRegressionSeries) Len() int {
	return util.Math.MinInt(prs.GetLimit(), prs.InnerSeries.Len()-prs.GetOffset())
}