Brent constructor

const Brent({
  1. required String function,
  2. required double a,
  3. required double b,
  4. double tolerance = 1.0e-10,
  5. int maxSteps = 15,
})

Instantiates a new object to find the root of an equation by using the Chords method.

  • function: the function f(x)
  • a: the first interval in which evaluate f(a)
  • b: the second interval in which evaluate f(b)
  • tolerance: how accurate the algorithm has to be
  • maxSteps: how many iterations at most the algorithm has to do

Implementation

const Brent({
  required String function,
  required this.a,
  required this.b,
  double tolerance = 1.0e-10,
  int maxSteps = 15,
}) : super(
        function: function,
        tolerance: tolerance,
        maxSteps: maxSteps,
      );