Grid 0.7.0
AlgRemezGeneral Class Reference

#include <RemezGeneral.h>

Public Types

enum  PolyType { Even , Odd , Full }

Public Member Functions

 AlgRemezGeneral (double lower, double upper, long prec, bigfloat(*f)(bigfloat x, void *data), void *data)
int getDegree (void) const
void setBounds (double lower, double upper)
void getBounds (double &lower, double &upper) const
double generateApprox (int num_degree, int den_degree, PolyType num_type, PolyType den_type, const double tolerance=1e-15, const int report_freq=1000)
double generateApprox (int num_degree, int den_degree, const double tolerance=1e-15, const int report_freq=1000)
double evaluateApprox (double x) const
double evaluateInverseApprox (double x) const
double evaluateFunc (double x) const
double evaluateInverseFunc (double x) const
void csv (std::ostream &os=std::cout) const
double getCoeffNum (const int i) const
double getCoeffDen (const int i) const

Private Member Functions

void setupPolyProperties (int num_degree, int den_degree, PolyType num_type_in, PolyType den_type_in)
void initialGuess ()
void stpini ()
void reinitializeAlgorithm ()
void equations ()
void search ()
bigfloat func (bigfloat x) const
bigfloat getErr (bigfloat x, int *sign) const
int simq ()
bigfloat approx (bigfloat x) const

Private Attributes

bigfloat(* f )(bigfloat x, void *data)
void * data
std::vector< bigfloatparam
bigfloat norm
int n
int d
int pow_n
int pow_d
PolyType num_type
PolyType den_type
std::vector< int > num_pows
std::vector< int > den_pows
bigfloat apstrt
bigfloat apwidt
bigfloat apend
int nd1
int iter
std::vector< bigfloatxx
std::vector< bigfloatmm
std::vector< bigfloatstep
bigfloat delta
bigfloat spread
std::vector< bigfloatyy
std::vector< bigfloatA
std::vector< bigfloatB
std::vector< int > IPS
int neq
long prec

Detailed Description

Definition at line 21 of file RemezGeneral.h.

Member Enumeration Documentation

◆ PolyType

Enumerator
Even 
Odd 
Full 

Definition at line 23 of file RemezGeneral.h.

Constructor & Destructor Documentation

◆ AlgRemezGeneral()

AlgRemezGeneral::AlgRemezGeneral ( double lower,
double upper,
long prec,
bigfloat(* )(bigfloat x, void *data),
void * data )

Definition at line 13 of file RemezGeneral.cc.

References apend, apstrt, apwidt, d, data, f, n, pow_d, pow_n, prec, and bigfloat::setDefaultPrecision().

Member Function Documentation

◆ setupPolyProperties()

void AlgRemezGeneral::setupPolyProperties ( int num_degree,
int den_degree,
PolyType num_type_in,
PolyType den_type_in )
private

Definition at line 27 of file RemezGeneral.cc.

References d, den_pows, den_type, Even, Full, n, num_pows, num_type, Odd, pow_d, and pow_n.

Referenced by generateApprox().

◆ initialGuess()

void AlgRemezGeneral::initialGuess ( )
private

Definition at line 132 of file RemezGeneral.cc.

References apend, apstrt, apwidt, cos(), exp(), M_PI, mm, neq, and xx.

Referenced by reinitializeAlgorithm().

◆ stpini()

void AlgRemezGeneral::stpini ( )
private

Definition at line 159 of file RemezGeneral.cc.

References apend, apstrt, delta, neq, step, and xx.

Referenced by reinitializeAlgorithm().

◆ reinitializeAlgorithm()

void AlgRemezGeneral::reinitializeAlgorithm ( )
private

Definition at line 72 of file RemezGeneral.cc.

References A, B, d, initialGuess(), IPS, iter, mm, n, neq, param, spread, step, stpini(), xx, and yy.

Referenced by generateApprox().

◆ equations()

void AlgRemezGeneral::equations ( )
private

Definition at line 265 of file RemezGeneral.cc.

References A, B, d, den_pows, func(), n, neq, num_pows, pow_d, pow_n, simq(), and xx.

Referenced by generateApprox().

◆ search()

void AlgRemezGeneral::search ( )
private

Definition at line 168 of file RemezGeneral.cc.

References apend, apstrt, delta, getErr(), mm, neq, spread, step, xx, and yy.

Referenced by generateApprox().

◆ func()

bigfloat AlgRemezGeneral::func ( bigfloat x) const
inlineprivate

Definition at line 90 of file RemezGeneral.h.

References data, and f.

Referenced by equations(), evaluateFunc(), evaluateInverseFunc(), and getErr().

◆ getErr()

bigfloat AlgRemezGeneral::getErr ( bigfloat x,
int * sign ) const
private

Definition at line 318 of file RemezGeneral.cc.

References approx(), f, and func().

Referenced by csv(), generateApprox(), and search().

◆ simq()

int AlgRemezGeneral::simq ( )
private

Definition at line 332 of file RemezGeneral.cc.

References A, B, IPS, n, neq, param, and sum().

Referenced by equations().

◆ approx()

bigfloat AlgRemezGeneral::approx ( bigfloat x) const
private

Definition at line 304 of file RemezGeneral.cc.

References d, den_pows, n, num_pows, param, pow_d, and pow_n.

Referenced by evaluateApprox(), evaluateInverseApprox(), and getErr().

◆ getDegree()

int AlgRemezGeneral::getDegree ( void ) const
inline

Definition at line 108 of file RemezGeneral.h.

References d, and n.

◆ setBounds()

void AlgRemezGeneral::setBounds ( double lower,
double upper )
inline

Definition at line 113 of file RemezGeneral.h.

References apend, apstrt, and apwidt.

◆ getBounds()

void AlgRemezGeneral::getBounds ( double & lower,
double & upper ) const
inline

Definition at line 120 of file RemezGeneral.h.

References apend, and apstrt.

◆ generateApprox() [1/2]

double AlgRemezGeneral::generateApprox ( int num_degree,
int den_degree,
PolyType num_type,
PolyType den_type,
const double tolerance = 1e-15,
const int report_freq = 1000 )

◆ generateApprox() [2/2]

double AlgRemezGeneral::generateApprox ( int num_degree,
int den_degree,
const double tolerance = 1e-15,
const int report_freq = 1000 )
inline

Definition at line 130 of file RemezGeneral.h.

References Full, and generateApprox().

◆ evaluateApprox()

double AlgRemezGeneral::evaluateApprox ( double x) const
inline

Definition at line 137 of file RemezGeneral.h.

References approx().

Referenced by computeZmobiusOmega(), and csv().

◆ evaluateInverseApprox()

double AlgRemezGeneral::evaluateInverseApprox ( double x) const
inline

Definition at line 142 of file RemezGeneral.h.

References approx().

◆ evaluateFunc()

double AlgRemezGeneral::evaluateFunc ( double x) const
inline

Definition at line 147 of file RemezGeneral.h.

References func().

Referenced by csv().

◆ evaluateInverseFunc()

double AlgRemezGeneral::evaluateInverseFunc ( double x) const
inline

Definition at line 152 of file RemezGeneral.h.

References func().

◆ csv()

void AlgRemezGeneral::csv ( std::ostream & os = std::cout) const

◆ getCoeffNum()

double AlgRemezGeneral::getCoeffNum ( const int i) const
inline

Definition at line 160 of file RemezGeneral.h.

References num_pows, and param.

Referenced by computeZmobiusOmega(), and csv().

◆ getCoeffDen()

double AlgRemezGeneral::getCoeffDen ( const int i) const
inline

Definition at line 164 of file RemezGeneral.h.

References den_pows, n, param, and pow_d.

Referenced by computeZmobiusOmega(), and csv().

Field Documentation

◆ f

bigfloat(* AlgRemezGeneral::f) (bigfloat x, void *data)
private

Definition at line 28 of file RemezGeneral.h.

Referenced by AlgRemezGeneral(), csv(), func(), and getErr().

◆ data

void* AlgRemezGeneral::data
private

Definition at line 29 of file RemezGeneral.h.

Referenced by AlgRemezGeneral(), and func().

◆ param

std::vector<bigfloat> AlgRemezGeneral::param
private

Definition at line 32 of file RemezGeneral.h.

Referenced by approx(), getCoeffDen(), getCoeffNum(), reinitializeAlgorithm(), and simq().

◆ norm

bigfloat AlgRemezGeneral::norm
private

Definition at line 33 of file RemezGeneral.h.

◆ n

int AlgRemezGeneral::n
private

◆ d

int AlgRemezGeneral::d
private

◆ pow_n

int AlgRemezGeneral::pow_n
private

Definition at line 38 of file RemezGeneral.h.

Referenced by AlgRemezGeneral(), approx(), csv(), equations(), and setupPolyProperties().

◆ pow_d

int AlgRemezGeneral::pow_d
private

Definition at line 38 of file RemezGeneral.h.

Referenced by AlgRemezGeneral(), approx(), csv(), equations(), getCoeffDen(), and setupPolyProperties().

◆ num_type

PolyType AlgRemezGeneral::num_type
private

Definition at line 41 of file RemezGeneral.h.

Referenced by setupPolyProperties().

◆ den_type

PolyType AlgRemezGeneral::den_type
private

Definition at line 42 of file RemezGeneral.h.

Referenced by setupPolyProperties().

◆ num_pows

std::vector<int> AlgRemezGeneral::num_pows
private

Definition at line 43 of file RemezGeneral.h.

Referenced by approx(), equations(), getCoeffNum(), and setupPolyProperties().

◆ den_pows

std::vector<int> AlgRemezGeneral::den_pows
private

Definition at line 44 of file RemezGeneral.h.

Referenced by approx(), equations(), getCoeffDen(), and setupPolyProperties().

◆ apstrt

bigfloat AlgRemezGeneral::apstrt
private

Definition at line 47 of file RemezGeneral.h.

Referenced by AlgRemezGeneral(), csv(), getBounds(), initialGuess(), search(), setBounds(), and stpini().

◆ apwidt

bigfloat AlgRemezGeneral::apwidt
private

Definition at line 47 of file RemezGeneral.h.

Referenced by AlgRemezGeneral(), initialGuess(), and setBounds().

◆ apend

bigfloat AlgRemezGeneral::apend
private

Definition at line 47 of file RemezGeneral.h.

Referenced by AlgRemezGeneral(), csv(), getBounds(), initialGuess(), search(), setBounds(), and stpini().

◆ nd1

int AlgRemezGeneral::nd1
private

Definition at line 50 of file RemezGeneral.h.

◆ iter

int AlgRemezGeneral::iter
private

Definition at line 50 of file RemezGeneral.h.

Referenced by generateApprox(), and reinitializeAlgorithm().

◆ xx

std::vector<bigfloat> AlgRemezGeneral::xx
private

Definition at line 51 of file RemezGeneral.h.

Referenced by equations(), initialGuess(), reinitializeAlgorithm(), search(), and stpini().

◆ mm

std::vector<bigfloat> AlgRemezGeneral::mm
private

Definition at line 52 of file RemezGeneral.h.

Referenced by csv(), generateApprox(), initialGuess(), reinitializeAlgorithm(), and search().

◆ step

std::vector<bigfloat> AlgRemezGeneral::step
private

Definition at line 53 of file RemezGeneral.h.

Referenced by reinitializeAlgorithm(), search(), and stpini().

◆ delta

bigfloat AlgRemezGeneral::delta
private

Definition at line 55 of file RemezGeneral.h.

Referenced by generateApprox(), search(), and stpini().

◆ spread

bigfloat AlgRemezGeneral::spread
private

Definition at line 55 of file RemezGeneral.h.

Referenced by generateApprox(), reinitializeAlgorithm(), and search().

◆ yy

std::vector<bigfloat> AlgRemezGeneral::yy
private

Definition at line 58 of file RemezGeneral.h.

Referenced by reinitializeAlgorithm(), and search().

◆ A

std::vector<bigfloat> AlgRemezGeneral::A
private

Definition at line 61 of file RemezGeneral.h.

Referenced by equations(), reinitializeAlgorithm(), and simq().

◆ B

std::vector<bigfloat> AlgRemezGeneral::B
private

Definition at line 62 of file RemezGeneral.h.

Referenced by equations(), reinitializeAlgorithm(), and simq().

◆ IPS

std::vector<int> AlgRemezGeneral::IPS
private

Definition at line 63 of file RemezGeneral.h.

Referenced by reinitializeAlgorithm(), and simq().

◆ neq

int AlgRemezGeneral::neq
private

Definition at line 66 of file RemezGeneral.h.

Referenced by csv(), equations(), initialGuess(), reinitializeAlgorithm(), search(), simq(), and stpini().

◆ prec

long AlgRemezGeneral::prec
private

Definition at line 69 of file RemezGeneral.h.

Referenced by AlgRemezGeneral().


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