Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

below is the class for root finder i need the full code includeing main class for below method in c++ class RootFinder { public: RootFinder()

below is the class for root finder

i need the full code includeing main class for below method in c++

class RootFinder {

public:

RootFinder() : tol_f(0.0), rel_tol_f(0.0), tol_x(0.0), rel_tol_x(0.0), max_iter(0) {} ~RootFinder() {}

int root_bisection(double target, double x_low, double x_high, double & x, int & num_iter) const;

int root_NR(double target, double x0, double & x, int & num_iter) const;

int root_secant(double target, double x0, double x1, double & x, int & num_iter) const;

// data double tol_f;

double rel_tol_f; double tol_x;

double rel_tol_x; int max_iter;

// function pointers double (*func1)(double x);

void (*func2)(double x, double &f, double &fprime); };

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

Question Can employees make contributions to a profit sharing plan?

Answered: 1 week ago