Back to Eqiora docs Skip to main content

simplex_centroid_rule

Function simplex_centroid_rule 

pub fn simplex_centroid_rule(
    dimension: usize,
) -> Result<QuadratureRule, Diagnostic>
Description

Construct the centroid rule on a unit simplex of runtime dimension d.

The point has barycentric coordinates 1 / (d + 1) and weight 1 / d!, so the rule integrates every affine scalar function exactly in any representable dimension.

ยงErrors

Returns EQ0804 when the dimension is zero or d! cannot be represented as a finite positive f64 weight.