// Add adds the selector string's matching nodes to those in the current
// selection and returns a new Selection object.
// The selector string is run in the context of the document of the current
// Selection object.
6432
func (s *Selection) Add(selector string) *Selection {
	return s.AddNodes(findWithMatcher([]*html.Node{s.document.rootNode}, compileMatcher(selector))...)
}
21075
func (s *set) add(elt setElement) bool {
	_, ok := s.m[elt]
	s.m[elt] = struct{}{}
	return !ok
}
549143
func (sc ScatterGather) Add(wd string, rel string) error {
	cleaned := filepath.Clean(rel)
	if _, ok := sc[cleaned]; ok {
		return errors.Reason("name conflict %q", rel).Err()
	}
	sc[cleaned] = wd
	return nil
}
858689
func (p *Pipeline) Add(n Acceptor) {
	p.mutex.Lock()
	defer p.mutex.Unlock()

	p.nodes = append(p.nodes, n)
}
1139995
func (n *Node) AddChild(s string, c *Node) {
	// Lazy lazy
	if n.Children == nil {
		n.Children = map[string]Nodes{}
	}

	n.Children[s] = append(n.Children[s], c)
}
620784
func (idx *InvertedIndex) Add(docs ...Document) error {
	var err error
	for _, config := range idx.cfg.Indices {
		if config.Weight == 0 {
			// Disabled
			continue
		}
		setm := idx.index[config.Name]

		for _, doc := range docs {
			var words []Keyword
			words, err = doc.RelatedKeywords(config)
			if err != nil {
				continue
			}

			for _, keyword := range words {
				setm[keyword] = append(setm[keyword], doc)
			}
		}
	}

	return err

}
519647
func (r *ring) add(key []byte, entry *entry) {
	r.getPartition(key).add(key, entry)
	atomic.AddInt64(&r.keysHint, 1)
}
539680
func (s *CursorStats) Add(other CursorStats) {
	s.ScannedValues += other.ScannedValues
	s.ScannedBytes += other.ScannedBytes
}
621270
func Add(has []string, new []string) []string {
	sorted := sortAndCopy(has)
	for _, s := range new {
		i := sort.SearchStrings(sorted, s)
		if i == len(sorted) {
			sorted = append(sorted, s)
		} else if sorted[i] != s {
			sorted = append(sorted, "")
			copy(sorted[i+1:], sorted[i:])
			sorted[i] = s
		}
	}
	return sorted
}
566510
func (ot *orderedTree) add(entry Entry) *node {
	var node *node
	list := &ot.top

	for i := uint64(1); i <= ot.dimensions; i++ {
		if isLastDimension(ot.dimensions, i) {
			overwritten := list.add(
				newNode(entry.ValueAtDimension(i), entry, false),
			)
			if overwritten == nil {
				ot.number++
			}
			return overwritten
		}
		node, _ = list.getOrAdd(entry, i, ot.dimensions)
		list = &node.orderedNodes
	}

	return nil
}
1230821
func (a Annotation) Add(key, value string) Annotation {
	a.setVal(key, value)
	return a
}
1013774
func (v Values) Add(key, value string) {
	v[key] = append(v[key], value)
}
88283
func (t *Templates) Add(src string) error {
	if _, err := t.parsed.Parse(src); err != nil {
		return err
	}
	return nil
}
540064
func (b *SampleJSONBuilder) Add(info *SamplePropertyInfo) *SampleJSONBuilder {
	b._properties[info.fieldName] = info
	return b
}
1066071
func (s *Selection) AddNodes(nodes ...*html.Node) *Selection {
	return pushStack(s, appendWithoutDuplicates(s.Nodes, nodes, nil))
}
1070297
func (mt *MutationState) Add(tokens ...MutationToken) {
	for _, v := range tokens {
		mt.addSingle(v)
	}
}
147232
func (s *Selection) AppendSelection(sel *Selection) *Selection {
	return s.AppendNodes(sel.Nodes...)
}