{ } Raw JSON

bundles / scipy 1.17.1 / scipy / integrate / _rules / _base / NestedFixedRule

class

scipy.integrate._rules._base:NestedFixedRule

source: /scipy/integrate/_rules/_base.py :245

Signature

class   NestedFixedRule ( higher lower )

Members

Summary

A cubature rule with error estimate given by the difference between two underlying fixed rules.

Extended Summary

If constructed as NestedFixedRule(higher, lower), this will use

estimate(f, a, b) := higher.estimate(f, a, b)
estimate_error(f, a, b) := \|higher.estimate(f, a, b) - lower.estimate(f, a, b)|

(where the absolute value is taken elementwise).

Attributes

higher : Rule

Higher accuracy rule.

lower : Rule

Lower accuracy rule.

Examples

from scipy.integrate import cubature
from scipy.integrate._rules import (
    GaussLegendreQuadrature, NestedFixedRule, ProductNestedFixed
)
higher = GaussLegendreQuadrature(10)
lower = GaussLegendreQuadrature(5)
rule = NestedFixedRule(
    higher,
    lower
)
rule_2d = ProductNestedFixed([rule, rule])

See also

GaussKronrodQuadrature

Aliases

  • scipy.integrate._rules.NestedFixedRule