Functions
This module contains the algorithms for the integration lab.
- labs.integration.integration_algorithms.monte_carlo_naive_one(f, a=0, b=1, n=10, seed=123)[source]
Return naive monte carlo example.
- labs.integration.integration_algorithms.monte_carlo_naive_two_dimensions(f, a=0, b=1, n=10, seed=128)[source]
Return naive monte carlo example (two-dimensional).
Restricted to same integration domain for both variables.
- labs.integration.integration_algorithms.monte_carlo_quasi_two_dimensions(f, a=0, b=1, n=10, rule='random')[source]
Return Monte Carlo example (two-dimensional).
Corresponds to naive Monthe Carlo for rule=’random’. Restricted to same integration domain for both variables.
- labs.integration.integration_algorithms.quadrature_gauss_legendre_one(f, a, b, n)[source]
Return quadrature gauss legendre example.
- labs.integration.integration_algorithms.quadrature_gauss_legendre_two(f, a=- 1, b=1, n=10)[source]
Return quadrature gauss legendre example.