Newton constructor
const
Newton({})
Instantiates a new object to find the root of an equation by using the Newton method.
function
: the function f(x)x0
: the initial guess x0tolerance
: how accurate the algorithm has to bemaxSteps
: how many iterations at most the algorithm has to do
Implementation
const Newton({
required String function,
required this.x0,
double tolerance = 1.0e-10,
int maxSteps = 10,
}) : super(
function: function,
tolerance: tolerance,
maxSteps: maxSteps,
);