メインページ   クラス階層   構成   ファイル一覧   構成メンバ   ファイルメンバ  

ODESSA-opts.h

解説を見る。
00001 // DO NOT EDIT!
00002 // Generated automatically from ODESSA-opts.in.
00003 
00004 #if !defined (octave_ODESSA_options_h)
00005 #define octave_ODESSA_options_h 1
00006 
00007 #include <cfloat>
00008 #include <cmath>
00009 
00010 #include <ODES.h>
00011 
00012 
00013 class
00014 ODESSA_options
00015 {
00016 public:
00017 
00018   ODESSA_options (void) { init (); }
00019 
00020   ODESSA_options (const ODESSA_options& opt) { copy (opt); }
00021 
00022   ODESSA_options& operator = (const ODESSA_options& opt)
00023     {
00024       if (this != &opt)
00025         copy (opt);
00026 
00027       return *this;
00028     }
00029 
00030   ~ODESSA_options (void) { }
00031 
00032   void init (void)
00033     {
00034       x_absolute_tolerance.resize (1);
00035       x_absolute_tolerance(0) = ::sqrt (DBL_EPSILON);
00036       x_relative_tolerance = ::sqrt (DBL_EPSILON);
00037       x_initial_step_size = -1.0;
00038       x_maximum_order = -1;
00039       x_maximum_step_size = -1.0;
00040       x_minimum_step_size = 0.0;
00041       x_step_limit = 100000;
00042       reset = true;
00043     }
00044 
00045   void copy (const ODESSA_options& opt)
00046     {
00047       x_absolute_tolerance = opt.x_absolute_tolerance;
00048       x_relative_tolerance = opt.x_relative_tolerance;
00049       x_integration_method = opt.x_integration_method;
00050       x_initial_step_size = opt.x_initial_step_size;
00051       x_maximum_order = opt.x_maximum_order;
00052       x_maximum_step_size = opt.x_maximum_step_size;
00053       x_minimum_step_size = opt.x_minimum_step_size;
00054       x_step_limit = opt.x_step_limit;
00055       reset = opt.reset;
00056     }
00057 
00058   void set_options (const ODESSA_options& opt) { copy (opt); }
00059 
00060   void set_default_options (void) { init (); }
00061 
00062   void set_absolute_tolerance (double val)
00063     {
00064       x_absolute_tolerance.resize (1);
00065       x_absolute_tolerance(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON);
00066       reset = true;
00067     }
00068 
00069   void set_absolute_tolerance (const Array<double>& val)
00070     { x_absolute_tolerance = val; reset = true; }
00071 
00072   void set_relative_tolerance (double val)
00073     { x_relative_tolerance = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); reset = true; }
00074 
00075   void set_integration_method (const std::string& val)
00076     {
00077       if (val == "stiff" || val == "bdf")
00078         x_integration_method = "stiff";
00079       else if (val == "non-stiff" || val == "adams")
00080         x_integration_method = "non-stiff";
00081       else
00082         (*current_liboctave_error_handler)
00083           ("lsode_options: method must be \"stiff\", \"bdf\", \"non-stiff\", or \"adams\"");
00084       reset = true;
00085     }
00086 
00087   void set_initial_step_size (double val)
00088     { x_initial_step_size = (val >= 0.0) ? val : -1.0; reset = true; }
00089 
00090   void set_maximum_order (int val)
00091     { x_maximum_order = val; reset = true; }
00092 
00093   void set_maximum_step_size (double val)
00094     { x_maximum_step_size = (val >= 0.0) ? val : -1.0; reset = true; }
00095 
00096   void set_minimum_step_size (double val)
00097     { x_minimum_step_size = (val >= 0.0) ? val : 0.0; reset = true; }
00098 
00099   void set_step_limit (int val)
00100     { x_step_limit = val; reset = true; }
00101   Array<double> absolute_tolerance (void) const
00102     { return x_absolute_tolerance; }
00103 
00104   double relative_tolerance (void) const
00105     { return x_relative_tolerance; }
00106 
00107   std::string integration_method (void) const
00108     { return x_integration_method; }
00109 
00110   double initial_step_size (void) const
00111     { return x_initial_step_size; }
00112 
00113   int maximum_order (void) const
00114     { return x_maximum_order; }
00115 
00116   double maximum_step_size (void) const
00117     { return x_maximum_step_size; }
00118 
00119   double minimum_step_size (void) const
00120     { return x_minimum_step_size; }
00121 
00122   int step_limit (void) const
00123     { return x_step_limit; }
00124 
00125 private:
00126 
00127   Array<double> x_absolute_tolerance;
00128   double x_relative_tolerance;
00129   std::string x_integration_method;
00130   double x_initial_step_size;
00131   int x_maximum_order;
00132   double x_maximum_step_size;
00133   double x_minimum_step_size;
00134   int x_step_limit;
00135 
00136 protected:
00137 
00138   bool reset;
00139 };
00140 
00141 #endif

Wed Dec 29 11:52:15 2004に生成されました。 doxygen1.2.18
SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送