NumCpp  2.17.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
nc::roots::Iteration Class Reference

ABC for iteration classes to derive from. More...

#include <Iteration.hpp>

Inherited by nc::roots::Bisection, nc::roots::Brent, nc::roots::Dekker, nc::roots::Newton, and nc::roots::Secant.

Public Member Functions

 Iteration (double epsilon) noexcept
 Iteration (double epsilon, uint32 maxNumIterations) noexcept
virtual ~Iteration () noexcept=default
uint32 numIterations () const noexcept

Protected Member Functions

void incrementNumberOfIterations ()
void resetNumberOfIterations () noexcept

Protected Attributes

const double epsilon_
uint32 maxNumIterations_ { 1000 }
uint32 numIterations_ { 0 }

Detailed Description

ABC for iteration classes to derive from.

Constructor & Destructor Documentation

◆ Iteration() [1/2]

nc::roots::Iteration::Iteration ( double epsilon)
inlineexplicitnoexcept

Constructor

Parameters
epsilonthe epsilon value

◆ Iteration() [2/2]

nc::roots::Iteration::Iteration ( double epsilon,
uint32 maxNumIterations )
inlinenoexcept

Constructor

Parameters
epsilonthe epsilon value
maxNumIterationsthe maximum number of iterations to perform

◆ ~Iteration()

virtual nc::roots::Iteration::~Iteration ( )
virtualdefaultnoexcept

Destructor

Member Function Documentation

◆ incrementNumberOfIterations()

void nc::roots::Iteration::incrementNumberOfIterations ( )
inlineprotected

Incraments the number of iterations

◆ numIterations()

uint32 nc::roots::Iteration::numIterations ( ) const
inlinenodiscardnoexcept

Returns the number of iterations

Returns
: number of iterations

◆ resetNumberOfIterations()

void nc::roots::Iteration::resetNumberOfIterations ( )
inlineprotectednoexcept

Resets the number of iterations

Field Documentation

◆ epsilon_

const double nc::roots::Iteration::epsilon_
protected

◆ maxNumIterations_

uint32 nc::roots::Iteration::maxNumIterations_ { 1000 }
protected

◆ numIterations_

uint32 nc::roots::Iteration::numIterations_ { 0 }
protected

The documentation for this class was generated from the following file: