Chords constructor

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

Creates a Chords 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 Chords({
  required super.function,
  required this.a,
  required this.b,
  super.tolerance = 1.0e-10,
  super.maxSteps = 15,
});