// G creates a group of values.
13018
func G(list ...interface{}) ValExprBuilder {
	if len(list) == 0 {
		return ValExprBuilder{makeErrVal("empty group")}
	}
	return ValExprBuilder{makeValTuple(list)}
}
576812
func gcd(x, y uint16) uint16 {
	for y != 0 {
		x, y = y, x%y
	}
	return x
}
184709
func LookupGid(groupName string) (gid int, err error) {
	return LookupGidFromFile(groupName, groupFilePath)
}
1337269
func (g GroupCount) Compare(o GroupCount) int {
	for i := range g.Group {
		if g.Group[i].RowID < o.Group[i].RowID {
			return -1
		}
		if g.Group[i].RowID > o.Group[i].RowID {
			return 1
		}
	}
	return 0
}
127466
func (c *Conn) InGroup(g Group) bool {
	return c.groups.Has(g)
}
662329
func (u *Ugen) GT(val Input) Input {
	return binOpGT(u.Rate, u, val, u.NumOutputs)
}
925463
func GT(m interface{}, value interface{}) (Predicate, error) {
	switch mapper := m.(type) {
	case RequestToInt:
		return intGT(mapper, value)
	case RequestToFloat64:
		return float64GT(mapper, value)
	}
	return nil, fmt.Errorf("unsupported argument: %T", m)
}
1147921
func Aggregate(stats []*stat.Stat) (aggregate StatsAggregate) {
	if stats == nil || len(stats) == 0 {
		return StatsAggregate{}
	}

	aggregate = StatsAggregate{Min : stats[0].Value, Max : stats[0].Value, Count : len(stats)}
	sum := 0.0
	for i := range stats {
		v := stats[i].Value

		sum += v

		if v < aggregate.Min {
			aggregate.Min = v
		}

		if v > aggregate.Max {
			aggregate.Max = v
		}
	}
	aggregate.Average = sum / float64(len(stats))

	return
}
148814
func (grng GammaGenerator) Gamma(alpha, beta float64) float64 {
	if !(alpha > 0.0) || !(beta > 0.0) {
		panic(fmt.Sprintf("Invalid parameter alpha %.2f beta %.2f", alpha, beta))
	}

	return grng.gamma(alpha, beta)
}
962234
func groupToGid(group string) (int, error) {
	if group == "" {
		return os.Getgid(), nil
	}

	var (
		err error
		id  int
	)

	// Try and parse as a number, if the error is ErrSyntax
	// (i.e. its not a number) then we carry on and try it as a
	// name.
	if id, err = strconv.Atoi(group); err == nil {
		return id, nil
	} else if err.(*strconv.NumError).Err != strconv.ErrSyntax {
		return 0, err
	}

	ginfo, err := user.LookupGroup(group)
	if err != nil {
		return 0, err
	}
	group = ginfo.Gid

	if id, err = strconv.Atoi(group); err != nil {
		return 0, err
	}

	return id, nil
}
399947
func (d *Context) Gc(flags uint) {
	C.duk_gc(d.duk_context, C.duk_uint_t(flags))
}
498237
func (ag *ArgGroup) ArgString() string {
	args := make([]string, len(ag.grp))
	for i, arg := range ag.grp {
		args[i] = arg.ArgString()
	}
	return strings.Join(args, "|")
}
656615
func Flatten(g Grouping) *Table {
	groups := g.Tables()
	switch len(groups) {
	case 0:
		return new(Table)

	case 1:
		return g.Table(groups[0])
	}

	tabs := make([]*Table, len(groups))
	for i, gid := range groups {
		tabs[i] = g.Table(gid)
	}

	return concatRows(tabs...)
}
710198
func (d *Duration) Gt(value time.Duration) *Duration {
	if d.value == nil {
		d.chain.fail("expected duration is set, but it is not")
		return d
	}
	if !(*d.value > value) {
		d.chain.fail("\nexpected duration > then:\n %s\n\nbut got:\n %s",
			value, *d.value)
	}
	return d
}
1279557
func (ns *Namespace) Group(key interface{}, items interface{}) (interface{}, error) {
	if key == nil {
		return nil, errors.New("nil is not a valid key to group by")
	}

	if g, ok := items.(collections.Grouper); ok {
		return g.Group(key, items)
	}

	in := newSliceElement(items)

	if g, ok := in.(collections.Grouper); ok {
		return g.Group(key, items)
	}

	return nil, fmt.Errorf("grouping not supported for type %T %T", items, in)
}
819710
func (g *group) Go(f func()) {
	g.wg.Add(1)
	go func() {
		defer g.wg.Done()
		f()
	}()
}
764308
func (g GroupOrder) String() string {
	if g < GroupNone || g > GroupReference {
		return groupOrder[GroupUnspecified]
	}
	return groupOrder[g]
}