NonLinear class abstract
Abstract class representing a nonlinear equation which can be solved with a particular root-finding algorithm. No complex numbers are allowed.
The so called "root-finding algorithms" are iterative methods that start from an initial value (or a couple of values) and try to build a scalar succession that converges as much as possible to the root. The algorithms implemented by this package are:
Each subclass of NonLinear has to define the solve method which is required in order to build the scalar succession with a certain logic.
- Implementers
Constructors
Properties
- function → String
-
The function f(x) for which the algorithm has to find a solution.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- maxSteps → int
-
The maximum number of iterations to be made by the algorithm.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tolerance → double
-
The accuracy of the algorithm.
final
Methods
-
convergence(
List< double> guesses, int steps) → double -
In order to get a meaningful result, it makes sense to compute the rate of
convergence only if the algorithm made at least 3
steps
(iterations). -
efficiency(
List< double> guesses, int steps) → double - The efficiency is evaluated only if the convergence is not double.nan. The formula is:
-
evaluateDerivativeOn(
double x) → num -
Evaluates the derivative of the function on the given
x
value. -
evaluateOn(
double x) → num -
Evaluates the function on the given
x
value. -
integrateOn(
NumericalIntegration numericalIntegration) → IntegralResults - Calculates the numerical value of the integral of this function using a NumericalIntegration algorithm.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
solve(
) → NonlinearResults - Returns a NonlinearResults object which contains the data calculated by the root-finding algorithm.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override