// Col returns a vector representing the corresponding column (starting at col 0).
// This package makes no distinction between row and column vectors, so it
// will be a normal VecN for a MxN matrix.
329767
func (m Mat2x3) Col(col int) Vec2 {
	return Vec2{m[col*2+0], m[col*2+1]}
}
477959
func colMatch(a *ast.ColumnName, b *ast.ColumnName) bool {
	if a.Schema.L == "" || a.Schema.L == b.Schema.L {
		if a.Table.L == "" || a.Table.L == b.Table.L {
			return a.Name.L == b.Name.L
		}
	}
	return false
}
479535
func (m Mat3x4) Row(row int) Vec4 {
	return Vec4{m[row+0], m[row+3], m[row+6], m[row+9]}
}
576955
func (m *Mat2x3) SetCol(col int, v Vec2) {
	m[col*2+0], m[col*2+1] = v[0], v[1]
}
886986
func Mat3x2FromCols(col0, col1 Vec3) Mat3x2 {
	return Mat3x2{col0[0], col0[1], col0[2], col1[0], col1[1], col1[2]}
}
206790
func (t *Table) Column(name string) Slice {
	if c, ok := t.cols[name]; ok {
		// It's a regular column or a constant column with a
		// cached expansion.
		return c
	}

	if cv, ok := t.consts[name]; ok {
		// Expand the constant column and cache the result.
		expanded := slice.Repeat(cv, t.len)
		t.cols[name] = expanded
		return expanded
	}

	return nil
}
1172851
func (b *SelectBuilder) Columns(columns ...string) *SelectBuilder {
	b.columns = append(b.columns, columns...)
	return b
}
1279061
func (m Mat3) Col(col int) Vec3 {
	return Vec3{m[col*3+0], m[col*3+1], m[col*3+2]}
}
724523
func (m Mat3x4) Cols() (col0, col1, col2, col3 Vec3) {
	return m.Col(0), m.Col(1), m.Col(2), m.Col(3)
}
613644
func (m Mat2x3) Cols() (col0, col1, col2 Vec2) {
	return m.Col(0), m.Col(1), m.Col(2)
}
77920
func (t *tableCommon) Cols() []*table.Column {
	if len(t.publicColumns) > 0 {
		return t.publicColumns
	}
	publicColumns := make([]*table.Column, len(t.Columns))
	maxOffset := -1
	for _, col := range t.Columns {
		if col.State != model.StatePublic {
			continue
		}
		publicColumns[col.Offset] = col
		if maxOffset < col.Offset {
			maxOffset = col.Offset
		}
	}
	return publicColumns[0 : maxOffset+1]
}
866151
func (b *InsertBuilder) Columns(columns ...string) *InsertBuilder {
	b.lock.Lock()
	b.columns = columns
	b.query = fmt.Sprintf(`%s(`, b.query)
	for i, column := range columns {
		b.query = fmt.Sprintf(`%s%s`, b.query, column)
		if i < len(columns)-1 {
			b.query = fmt.Sprintf(`%s,`, b.query)
		}
	}
	b.query = fmt.Sprintf(`%s)`, b.query)
	b.lock.Unlock()
	return b
}
711722
func (me identifier) Col(col interface{}) IdentifierExpression {
	ret := me.clone()
	if s, ok := me.col.(string); ok && s != "" && me.table == "" {
		ret.table = s
	}
	if col == "*" {
		ret.col = Star()
	} else {
		ret.col = col
	}

	return ret
}
1342216
func (mat *T) Get(col, row int) float32 {
	return mat[col][row]
}
1092906
func Column(dat string, separator string, col int) string {
	var pattern string
	for idx := 1; idx < col; idx++ {
		pattern += fmt.Sprintf("[a-zA-Z0-9]+%s", separator)
	}
	pattern += fmt.Sprintf("%s%s*", "([a-zA-Z0-9]+)", separator)
	regx := regexp.MustCompile(pattern)
	result := regx.FindStringSubmatch(dat)
	if len(result) == 0 {
		return ""
	}
	return result[1]
}
990497
func (c *Columns) Columns() []Column {
	var result []Column
	for _, col := range c.columns {
		result = append(result, *col)
	}
	return result
}
1305144
func (s *rowSegment) Columns() []uint64 {
	a := make([]uint64, 0, s.Count())
	itr := s.data.Iterator()
	for v, eof := itr.Next(); !eof; v, eof = itr.Next() {
		a = append(a, v)
	}
	return a
}