MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
bisection.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGBISECTION_HH_
6 #define _MGBISECTION_HH_
7 #include "mg/MGCL.h"
8 
10 
17 public:
18 
20  double ts,
21  double te
22 );
23 
24 //Virtual Destructor
25 virtual ~MGBisection(){;};
26 
28 virtual void set_initial_t(double t)=0;
29 
33 virtual double compare_replace(
34  double t,
35  bool& replaced
36 )=0;
37 
39 double solve(
40  double t,
41  double span_initial,
42  double tolerance,
44  int& nrepition
45 );
46 
47 private:
48  double m_ts, m_te;
49 };
50  // end of ALGORITHM group
52 
53 #endif
virtual ~MGBisection()
Definition: bisection.h:25
virtual double compare_replace(double t, bool &replaced)=0
double solve(double t, double span_initial, double tolerance, int &nrepition)
Solve the equation with bisection method.
A virtual super class to solve non-linear equations by the bicection method.
Definition: bisection.h:16
MGBisection(double ts, double te)
virtual void set_initial_t(double t)=0
Prepare by setting the initial value.