// Row returns a vector representing the corresponding row (starting at row 0).
// This package makes no distinction between row and column vectors, so it
// will be a normal VecM for a MxN matrix.
185584
func (m Mat4) Row(row int) Vec4 {
	return Vec4{m[row+0], m[row+4], m[row+8], m[row+12]}
}
229264
func (m Mat2x3) Row(row int) Vec3 {
	return Vec3{m[row+0], m[row+2], m[row+4]}
}
476691
func (v *view) row(rowID uint64) *Row {
	row := NewRow()
	for _, frag := range v.allFragments() {
		fr := frag.row(rowID)
		if fr == nil {
			continue
		}
		row.Merge(fr)
	}
	return row

}
1195584
func (m Mat2x4) Rows() (row0, row1 Vec4) {
	return m.Row(0), m.Row(1)
}
458605
func (m *Mat3x2) SetRow(row int, v Vec2) {
	m[row+0], m[row+3] = v[0], v[1]
}
193961
func Mat4x2FromRows(row0, row1, row2, row3 Vec2) Mat4x2 {
	return Mat4x2{row0[0], row1[0], row2[0], row3[0], row0[1], row1[1], row2[1], row3[1]}
}
353034
func NewRow(columns ...uint64) *Row {
	r := &Row{}
	for _, i := range columns {
		r.SetBit(i)
	}
	return r
}
329767
func (m Mat2x3) Col(col int) Vec2 {
	return Vec2{m[col*2+0], m[col*2+1]}
}
821447
func (m *Mat4) SetRow(row int, v Vec4) {
	m[row+0], m[row+4], m[row+8], m[row+12] = v[0], v[1], v[2], v[3]
}
1053432
func (m Mat2x4) Col(col int) Vec2 {
	return Vec2{m[col*2+0], m[col*2+1]}
}
962758
func (t *tableCommon) Row(ctx sessionctx.Context, h int64) ([]types.Datum, error) {
	r, err := t.RowWithCols(ctx, h, t.Cols())
	if err != nil {
		return nil, err
	}
	return r, nil
}
996584
func (m Mat2) Col(col int) Vec2 {
	return Vec2{m[col*2+0], m[col*2+1]}
}
372750
func (r *Row) Columns() []uint64 {
	a := make([]uint64, 0, r.Count())
	for i := range r.segments {
		a = append(a, r.segments[i].Columns()...)
	}
	return a
}
201652
func (s *Sheet) AddRow() *Row {
	row := &Row{Sheet: s}
	s.Rows = append(s.Rows, row)
	if len(s.Rows) > s.MaxRow {
		s.MaxRow = len(s.Rows)
	}
	return row
}
806657
func (m Mat4) Rows() (row0, row1, row2, row3 Vec4) {
	return m.Row(0), m.Row(1), m.Row(2), m.Row(3)
}
447056
func (t *Table) AddRow(row []string) {
	limit := min(len(row), len(t.columns))
	for i := 0; i < limit; i++ {
		cellWidth := len(row[i])
		t.columns[i].width = max(cellWidth, t.columns[i].width)
	}
	t.rows = append(t.rows, row[:limit])
}
679816
func (m Mat2x3) Rows() (row0, row1 Vec3) {
	return m.Row(0), m.Row(1)
}