// Atoms returns the number of atoms of nuclide n for mass m.
322710
func Atoms(n Nuc, m Mass) float64 {
	v := float64(n.A()) * g / Mol
	return float64(m) / v
}
94026
func (m *Matrix) Multiply(m2 *Matrix) (m3 *Matrix, err error) {
	if m.stride*m2.stride != len(m2.elements) {
		return nil, ErrDimensionMismatch
	}

	m3 = &Matrix{epsilon: m.epsilon, stride: m2.stride, elements: make([]float64, (len(m.elements)/m.stride)*m2.stride)}
	for m1c0, m3x := 0, 0; m1c0 < len(m.elements); m1c0 += m.stride {
		for m2r0 := 0; m2r0 < m2.stride; m2r0++ {
			for m1x, m2x := m1c0, m2r0; m2x < len(m2.elements); m2x += m2.stride {
				m3.elements[m3x] += m.elements[m1x] * m2.elements[m2x]
				m1x++
			}
			m3x++
		}
	}
	return
}
868109
@Override
    public boolean matches(IAtom atom) {
        if (mass == 0)
            return atom.getMassNumber() == null;
        else
            return atom.getMassNumber() != null && mass == atom.getMassNumber();
    }
181058
func (t Term) Nth(args ...interface{}) Term {
	return constructMethodTerm(t, "Nth", p.Term_NTH, args, map[string]interface{}{})
}
836596
func (i *AtomicInt64) Set(n int64) {
	atomic.StoreInt64(&i.int64, n)
}
54852
func (e *Element) Dimensions() ([]float64, error) {
	var points []float64
	e.lock.RLock()

	params := &gcdapi.DOMGetBoxModelParams{
		NodeId: e.id,
	}
	box, err := e.tab.DOM.GetBoxModelWithParams(params)

	e.lock.RUnlock()

	if err != nil {
		return nil, err
	}
	points = box.Content
	return points, nil
}
214917
func (i *Int32) Store(n int32) {
	atomic.StoreInt32(&i.v, n)
}
850390
func (rd rootdata) rootAtom() atomWithPackages {
	a := atom{
		id: ProjectIdentifier{
			ProjectRoot: ProjectRoot(rd.rpt.ImportRoot),
		},
		// This is a hack so that the root project doesn't have a nil version.
		// It's sort of OK because the root never makes it out into the results.
		// We may need a more elegant solution if we discover other side
		// effects, though.
		v: rootRev,
	}

	list := make([]string, 0, len(rd.rpt.Packages))
	for path, pkg := range rd.rpt.Packages {
		if pkg.Err != nil && !rd.ig[path] {
			list = append(list, path)
		}
	}
	sort.Strings(list)

	return atomWithPackages{
		a:  a,
		pl: list,
	}
}
607474
func (ai *AtomicInt) Set(newValue int) {
	atomic.StoreInt64(&ai.val, int64(newValue))
}
1204152
func (a Sources) Measurements() []*Measurement {
	mms := make([]*Measurement, 0, len(a))
	for _, src := range a {
		switch src := src.(type) {
		case *Measurement:
			mms = append(mms, src)
		case *SubQuery:
			mms = append(mms, src.Statement.Sources.Measurements()...)
		}
	}
	return mms
}
635984
func (s *Statistics) N() uint64 {
	s.RLock()
	defer s.RUnlock()
	return s.samples
}
490539
func Data(n *exphtml.Node) string {
	if n.Data == "" {
		return n.DataAtom.String()
	}
	return n.Data
}
976756
func CreateAtomic(path string) (*AtomicWriter, error) {
	fs := fs.NewFilesystem(fs.FilesystemTypeBasic, filepath.Dir(path))
	return CreateAtomicFilesystem(fs, filepath.Base(path))
}
309118
func (e FAbsolute) Stats() []string {
	ret := make([]string, 0, len(e.Values))
	for _, v := range e.Values {
		ret = append(ret, fmt.Sprintf("%s:%g|a", e.Name, v))
	}
	return ret
}
994721
func (s *ShapeIndexCell) numEdges() int {
	var e int
	for _, cs := range s.shapes {
		e += cs.numEdges()
	}
	return e
}
919555
func (aa *AtomicArray) Get(idx int) interface{} {
	// do not lock if not needed
	if idx < 0 || idx >= aa.length {
		return nil
	}

	aa.mutex.RLock()
	res := aa.items[idx]
	aa.mutex.RUnlock()
	return res
}
1018164
func (c *Counters) Counts() map[string]int64 {
	c.mu.Lock()
	defer c.mu.Unlock()

	counts := make(map[string]int64, len(c.counts))
	for k, v := range c.counts {
		counts[k] = v
	}
	return counts
}