-
Notifications
You must be signed in to change notification settings - Fork 6
Integration
Rugen Heidbuchel edited this page Apr 30, 2015
·
6 revisions
The Integration class currently support single variable function integration. Several methods are implemented, but the general integrate function still has to be written.
Two constants define the basic behaviour of the Integration class:
-
INTEGRATION_ACCURACY
: defines the allowed error on the integration, standard is 10^-7 -
INTEGRATION_MAX_TIME
: defines the allowed time for the integration, standard set on 10 seconds Both constants can be altered, so that the values don't have to be passed to every function call.
Uses the simple iterative midpoint rule.
parameters:
-
a: Double
: The beginpoint of the interval. -
_ b: Double
: The endpoint of the interval. -
error err: Double
: The accuracy, standard set onINTEGRATION_ACCURACY
. -
k_max: Double
: The maximum number of iterations, standard set on 100. -
maxTime t_m: Double
: The maximum allowed time in seconds, standard set onINTEGRATION_MAX_TIME
. -
_ f: (Double) -> Double
: The function.
Uses the simple iterative trapezoid rule.
parameters:
-
a: Double
: The beginpoint of the interval. -
_ b: Double
: The endpoint of the interval. -
error err: Double
: The accuracy, standard set onINTEGRATION_ACCURACY
. -
k_max: Double
: The maximum number of iterations, standard set on 100. -
maxTime t_m: Double
: The maximum allowed time in seconds, standard set onINTEGRATION_MAX_TIME
. -
_ f: (Double) -> Double
: The function.
Uses the simple iterative Simpson rule.
parameters:
-
a: Double
: The beginpoint of the interval. -
_ b: Double
: The endpoint of the interval. -
error err: Double
: The accuracy, standard set onINTEGRATION_ACCURACY
. -
k_max: Double
: The maximum number of iterations, standard set on 100. -
maxTime t_m: Double
: The maximum allowed time in seconds, standard set onINTEGRATION_MAX_TIME
. -
_ f: (Double) -> Double
: The function.
Uses the adaptive Simpson rule.
parameters:
-
a: Double
: The beginpoint of the interval. -
_ b: Double
: The endpoint of the interval. -
error err: Double
: The accuracy, standard set onINTEGRATION_ACCURACY
. -
k_max: Double
: The maximum number of iterations, standard set on 100. -
maxTime t_m: Double
: The maximum allowed time in seconds, standard set onINTEGRATION_MAX_TIME
. -
_ f: (Double) -> Double
: The function.
- Implement general integrate function.
- Implement Gauss-Kronrod Adaptive Quadrature
- Implement Clenshaw-Curtis Adaptive Quadrature
- Implement Multi-parameter integration