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

DASSL-opts.h

解説を見る。
00001 // DO NOT EDIT!
00002 // Generated automatically from DASSL-opts.in.
00003 
00004 #if !defined (octave_DASSL_options_h)
00005 #define octave_DASSL_options_h 1
00006 
00007 #include <cfloat>
00008 #include <cmath>
00009 
00010 #include <DAE.h>
00011 
00012 
00013 class
00014 DASSL_options
00015 {
00016 public:
00017 
00018   DASSL_options (void) { init (); }
00019 
00020   DASSL_options (const DASSL_options& opt) { copy (opt); }
00021 
00022   DASSL_options& operator = (const DASSL_options& opt)
00023     {
00024       if (this != &opt)
00025         copy (opt);
00026 
00027       return *this;
00028     }
00029 
00030   ~DASSL_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.resize (1);
00037       x_relative_tolerance(0) = ::sqrt (DBL_EPSILON);
00038       x_initial_step_size = -1.0;
00039       x_maximum_order = -1;
00040       x_maximum_step_size = -1.0;
00041       x_step_limit = -1;
00042       reset = true;
00043     }
00044 
00045   void copy (const DASSL_options& opt)
00046     {
00047       x_absolute_tolerance = opt.x_absolute_tolerance;
00048       x_relative_tolerance = opt.x_relative_tolerance;
00049       x_compute_consistent_initial_condition = opt.x_compute_consistent_initial_condition;
00050       x_enforce_nonnegativity_constraints = opt.x_enforce_nonnegativity_constraints;
00051       x_initial_step_size = opt.x_initial_step_size;
00052       x_maximum_order = opt.x_maximum_order;
00053       x_maximum_step_size = opt.x_maximum_step_size;
00054       x_step_limit = opt.x_step_limit;
00055       reset = opt.reset;
00056     }
00057 
00058   void set_options (const DASSL_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     {
00074       x_relative_tolerance.resize (1);
00075       x_relative_tolerance(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON);
00076       reset = true;
00077     }
00078 
00079   void set_relative_tolerance (const Array<double>& val)
00080     { x_relative_tolerance = val; reset = true; }
00081 
00082   void set_compute_consistent_initial_condition (int val)
00083     { x_compute_consistent_initial_condition = val; reset = true; }
00084 
00085   void set_enforce_nonnegativity_constraints (int val)
00086     { x_enforce_nonnegativity_constraints = val; reset = true; }
00087 
00088   void set_initial_step_size (double val)
00089     { x_initial_step_size = (val >= 0.0) ? val : -1.0; reset = true; }
00090 
00091   void set_maximum_order (int val)
00092     { x_maximum_order = val; reset = true; }
00093 
00094   void set_maximum_step_size (double val)
00095     { x_maximum_step_size = (val >= 0.0) ? val : -1.0; reset = true; }
00096 
00097   void set_step_limit (int val)
00098     { x_step_limit = (val >= 0) ? val : -1; reset = true; }
00099   Array<double> absolute_tolerance (void) const
00100     { return x_absolute_tolerance; }
00101 
00102   Array<double> relative_tolerance (void) const
00103     { return x_relative_tolerance; }
00104 
00105   int compute_consistent_initial_condition (void) const
00106     { return x_compute_consistent_initial_condition; }
00107 
00108   int enforce_nonnegativity_constraints (void) const
00109     { return x_enforce_nonnegativity_constraints; }
00110 
00111   double initial_step_size (void) const
00112     { return x_initial_step_size; }
00113 
00114   int maximum_order (void) const
00115     { return x_maximum_order; }
00116 
00117   double maximum_step_size (void) const
00118     { return x_maximum_step_size; }
00119 
00120   int step_limit (void) const
00121     { return x_step_limit; }
00122 
00123 private:
00124 
00125   Array<double> x_absolute_tolerance;
00126   Array<double> x_relative_tolerance;
00127   int x_compute_consistent_initial_condition;
00128   int x_enforce_nonnegativity_constraints;
00129   double x_initial_step_size;
00130   int x_maximum_order;
00131   double x_maximum_step_size;
00132   int x_step_limit;
00133 
00134 protected:
00135 
00136   bool reset;
00137 };
00138 
00139 #endif

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