Gyoto
Gyoto::Astrobj::PolishDoughnut::intersection_t Class Reference

double intersection(double) Functor class More...

Inheritance diagram for Gyoto::Astrobj::PolishDoughnut::intersection_t:
Gyoto::Functor::Double_Double_const

Public Member Functions

 intersection_t (PolishDoughnut *parent)
virtual double operator() (double) const
 The actual function.
double ridders (double from, double to) const
 Ridder's root-finding method applied on operator()().
double secant (double from, double to)
 Secant root-finding method applied on operator()().

Public Attributes

PolishDoughnut * papa
int status
 Exit status code of "various" methods (at least secant() !).

Detailed Description

double intersection(double) Functor class

Implement former double intersection(double) function as a Gyoto::Functor::Double_Double_const subclass to access generic root-finding methods.

This class is instantiated in a single PolishDoughnut::intersection member.

Member Function Documentation

◆ operator()()

virtual double Gyoto::Astrobj::PolishDoughnut::intersection_t::operator() ( double ) const
virtual

The actual function.

Implements Gyoto::Functor::Double_Double_const.

◆ ridders()

double Gyoto::Functor::Double_Double_const::ridders ( double from,
double to ) const
inherited

Ridder's root-finding method applied on operator()().

Parameters
from,toboundaries for root-searching
Returns
the root

◆ secant()

double Gyoto::Functor::Double_Double_const::secant ( double from,
double to )
inherited

Secant root-finding method applied on operator()().

Sets status to -0 in case of convergence -1 if two distinct inputs evaluated to the same output -2 if maximum number of iterations (20) reached

Parameters
from,toboundaries for root-finding
Returns
the root

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