TrapezoidalRule class
The "trapezoidal rule" is a technique for approximating the value of a definite integral.
This algorithm requires a parameter m
which indicates how many partitions
have to be computed by the algorithm. The bigger the value of m
, the better
the result approximation.
- Inheritance
-
- Object
- NumericalIntegration
- TrapezoidalRule
Constructors
- TrapezoidalRule({required String function, required double lowerBound, required double upperBound, int intervals = 20})
-
Expects the
function
to be integrated ad the integration bounds (lowerBound
andupperBound
).const
Properties
- function → String
-
The function to be integrated on the given interval.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- intervals → int
-
The number of parts in which the interval
lowerBound, upperBound
has to be split by the algorithm.finalinherited - lowerBound → double
-
The lower bound of the integral.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- upperBound → double
-
The upper bound of the integral.
finalinherited
Methods
-
evaluateFunction(
double x) → double -
Evaluates the given function on the
x
point.inherited -
integrate(
) → IntegralResults -
Calculates the numerical value of the function definite integral
between lowerBound and upperBound.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited