// Computes column Means of a mat.Dense
968925
func means(X *mat.Dense) []float64 {
	n_obs, n_feats := X.Dims()
	var result []float64
	for j := 0; j < n_feats; j++ {
		sum_j := 0.0
		for i := 0; i < n_obs; i++ {
			sum_j = sum_j + X.At(i, j)
		}
		mean := (sum_j / float64(n_obs))
		result = append(result, mean)
	}
	return result
}
406148
func (m *Mat2) SetCol(col int, v Vec2) {
	m[col*2+0], m[col*2+1] = v[0], v[1]
}
233080
func (m *Mat2x4) SetCol(col int, v Vec2) {
	m[col*2+0], m[col*2+1] = v[0], v[1]
}
424054
func (m Mat4) Cols() (col0, col1, col2, col3 Vec4) {
	return m.Col(0), m.Col(1), m.Col(2), m.Col(3)
}
337670
func (m Mat3x2) Col(col int) Vec3 {
	return Vec3{m[col*3+0], m[col*3+1], m[col*3+2]}
}
329767
func (m Mat2x3) Col(col int) Vec2 {
	return Vec2{m[col*2+0], m[col*2+1]}
}
443901
func (m *Mat3x2) SetCol(col int, v Vec3) {
	m[col*3+0], m[col*3+1], m[col*3+2] = v[0], v[1], v[2]
}
724523
func (m Mat3x4) Cols() (col0, col1, col2, col3 Vec3) {
	return m.Col(0), m.Col(1), m.Col(2), m.Col(3)
}
1240423
func (mat *MatMxN) Zero(m, n int) {
	if mat == nil {
		return
	}

	mat.Reshape(m, n)
	for i := range mat.dat {
		mat.dat[i] = 0
	}
}
88371
func (m *Mat4x3) SetCol(col int, v Vec4) {
	m[col*4+0], m[col*4+1], m[col*4+2], m[col*4+3] = v[0], v[1], v[2], v[3]
}
666121
func Mat2x3FromCols(col0, col1, col2 Vec2) Mat2x3 {
	return Mat2x3{col0[0], col0[1], col1[0], col1[1], col2[0], col2[1]}
}
1034970
func (rows *OCI8Rows) Columns() []string {
	names := make([]string, len(rows.defines))
	for i, define := range rows.defines {
		names[i] = define.name
	}
	return names
}
334795
func (ms *MatStack) Load(m mgl64.Mat4) {
	(*ms)[len(*ms)-1] = m
}
776217
func (m mathUtil) Mean(values ...float64) float64 {
	return m.Sum(values...) / float64(len(values))
}
809001
func AggMax(cols ...string) Aggregator {
	max := func(xs []float64) float64 {
		_, x := stats.Bounds(xs)
		return x
	}
	return aggFn(max, "max ", cols...)
}
897584
func (e *Euclidean) Distance(vectorX *mat.Dense, vectorY *mat.Dense) float64 {
	subVector := mat.NewDense(1, 1, nil)
	subVector.Reset()
	subVector.Sub(vectorX, vectorY)
	result := e.InnerProduct(subVector, subVector)

	return math.Sqrt(result)
}
650352
func Mat3x4FromCols(col0, col1, col2, col3 Vec3) Mat3x4 {
	return Mat3x4{col0[0], col0[1], col0[2], col1[0], col1[1], col1[2], col2[0], col2[1], col2[2], col3[0], col3[1], col3[2]}
}