// Floor - Vector FLOOR
179924
func Floor(inReal []float64) []float64 {
	outReal := make([]float64, len(inReal))
	for i := 0; i < len(inReal); i++ {
		outReal[i] = math.Floor(inReal[i])
	}
	return outReal
}
1208897
func level(req *http.Request) (store.ConsistencyLevel, error) {
	q := req.URL.Query()
	lvl := strings.TrimSpace(q.Get("level"))

	switch strings.ToLower(lvl) {
	case "none":
		return store.None, nil
	case "weak":
		return store.Weak, nil
	case "strong":
		return store.Strong, nil
	default:
		return store.Weak, nil
	}
}
597342
func (b *Base) Level() LevelInfo {
	b.mutex.RLock()
	defer b.mutex.RUnlock()

	return b.level
}
265903
func (win *Window) Row(height int) *rowConstructor {
	win.rowCtor.height = win.ctx.scale(height)
	return &win.rowCtor
}
204177
func (m *Matrix) Row(row int) Vector {
	_, cols := m.Size()
	values := make([]float64, cols)
	for col := 0; col < cols; col++ {
		values[col] = m.Get(row, col)
	}
	return Vector(values)
}
578418
func (tmp *TieredMergePolicy) SetFloorSegmentMB(v float64) *TieredMergePolicy {
	assert2(v > 0, fmt.Sprintf("floorSegmentMB must be > 0 (got %v)", v))
	v *= 1024 * 1024
	tmp.floorSegmentBytes = math.MaxInt64
	if v < math.MaxInt64 {
		tmp.floorSegmentBytes = int64(v)
	}
	return tmp
}
694368
func (v PreciseVector) Vector() Vector {
	// The accuracy flag is ignored on these conversions back to float64.
	x, _ := v.X.Float64()
	y, _ := v.Y.Float64()
	z, _ := v.Z.Float64()
	return Vector{x, y, z}.Normalize()
}
1235889
func (document *Document) PaintTile(buf unsafe.Pointer, canvasWidth int, canvasHeight int, tilePosX int, tilePosY int, tileWidth int, tileHeight int) {
	C.paint_tile(
		document.handle,
		(*C.uchar)(buf),
		(C.int)(canvasWidth),
		(C.int)(canvasHeight),
		(C.int)(tilePosX),
		(C.int)(tilePosY),
		(C.int)(tileWidth),
		(C.int)(tileHeight),
	)
}
326386
func (sh *SlackrusHook) Levels() []logrus.Level {
	if sh.AcceptedLevels == nil {
		return AllLevels
	}
	return sh.AcceptedLevels
}
1231736
func (m *Matrix) Pad(w uint, mode PadMode) *Matrix {
	newRows := m.Rows + w*2
	newMatrix := make([][]float32, newRows)
	rows, cols := m.GetSize()
	var wg sync.WaitGroup
	for y := 0; y < int(newRows); y++ {
		wg.Add(1)
		switch mode {
		case Zero:
			go m.zeroPad(rows, cols, newMatrix, w, y, &wg)
		case Edge:
			go m.edgePad(rows, cols, newMatrix, w, y, &wg)
		}
	}
	wg.Wait()
	return NewMatrix(newMatrix)
}
688849
func (m Mat4x3) Rows() (row0, row1, row2, row3 Vec3) {
	return m.Row(0), m.Row(1), m.Row(2), m.Row(3)
}
462118
func Quantile(v []int64, q float64) int64 {
	n := len(v)
	if n == 0 {
		return 0
	}
	m := Floor(float64(n) * q)
	i := min(n-1, int(m))
	return v[i]
}
964227
func (m Mat3x4) Rows() (row0, row1, row2 Vec4) {
	return m.Row(0), m.Row(1), m.Row(2)
}
561838
func Floor(z, x *decimal.Big) *decimal.Big {
	if z.CheckNaNs(x, nil) {
		return z
	}
	ctx := z.Context
	ctx.RoundingMode = decimal.ToNegativeInf
	return ctx.RoundToInt(z.Copy(x))
}
899923
func floorFunc(q query, t iterator) interface{} {
	val := asNumber(t, q.Evaluate(t))
	return math.Floor(val)
}
1242656
func (d *Dataset) Rows(index ...int) ([]map[string]interface{}, error) {
	for _, i := range index {
		if i < 0 || i >= d.rows {
			return nil, ErrInvalidRowIndex
		}
	}

	rows := make([]map[string]interface{}, 0, len(index))
	for _, i := range index {
		row, _ := d.Row(i)
		rows = append(rows, row)
	}

	return rows, nil
}
567884
func (c *Cosine) Dot(vectorX *mat.Dense, vectorY *mat.Dense) float64 {
	subVector := new(mat.Dense)
	subVector.MulElem(vectorX, vectorY)
	result := mat.Sum(subVector)

	return result
}