English
The centroid of a family p: ι → P is the affine combination of the points p(i) with weights s.centroidWeights(k,i).
Русский
Центроид семейства p:ι→P есть аффинное сочетание точек p(i) с весами s.centroidWeights(k,i).
LaTeX
$$$\\mathrm{centroid}(k,s,p) = s.affineCombination(k,p, s.centroidWeights(k))$$$
Lean4
/-- The centroid of some points. Although defined for any `s`, this
is intended to be used in the case where the number of points,
converted to `k`, is not zero. -/
def centroid (p : ι → P) : P :=
s.affineCombination k p (s.centroidWeights k)