GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DASRT-opts.h
Go to the documentation of this file.
1 // DO NOT EDIT!
2 // Generated automatically from numeric/DASRT-opts.in.
3 
4 #if !defined (octave_DASRT_options_h)
5 #define octave_DASRT_options_h 1
6 
7 #include <cfloat>
8 #include <cmath>
9 
10 #include <DAERT.h>
11 
12 
13 class
15 {
16 public:
17 
19  : x_absolute_tolerance (),
20  x_relative_tolerance (),
21  x_initial_step_size (),
22  x_maximum_order (),
23  x_maximum_step_size (),
24  x_step_limit (),
25  reset ()
26  {
27  init ();
28  }
29 
31  : x_absolute_tolerance (opt.x_absolute_tolerance),
32  x_relative_tolerance (opt.x_relative_tolerance),
33  x_initial_step_size (opt.x_initial_step_size),
34  x_maximum_order (opt.x_maximum_order),
35  x_maximum_step_size (opt.x_maximum_step_size),
36  x_step_limit (opt.x_step_limit),
37  reset (opt.reset)
38  { }
39 
41  {
42  if (this != &opt)
43  {
44  x_absolute_tolerance = opt.x_absolute_tolerance;
45  x_relative_tolerance = opt.x_relative_tolerance;
46  x_initial_step_size = opt.x_initial_step_size;
47  x_maximum_order = opt.x_maximum_order;
48  x_maximum_step_size = opt.x_maximum_step_size;
49  x_step_limit = opt.x_step_limit;
50  reset = opt.reset;
51  }
52 
53  return *this;
54  }
55 
56  ~DASRT_options (void) { }
57 
58  void init (void)
59  {
60  x_absolute_tolerance.resize (dim_vector (1, 1));
61  x_absolute_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
62  x_relative_tolerance.resize (dim_vector (1, 1));
63  x_relative_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
64  x_initial_step_size = -1.0;
65  x_maximum_order = -1;
66  x_maximum_step_size = -1.0;
67  x_step_limit = -1;
68  reset = true;
69  }
70 
71  void set_options (const DASRT_options& opt)
72  {
73  x_absolute_tolerance = opt.x_absolute_tolerance;
74  x_relative_tolerance = opt.x_relative_tolerance;
75  x_initial_step_size = opt.x_initial_step_size;
76  x_maximum_order = opt.x_maximum_order;
77  x_maximum_step_size = opt.x_maximum_step_size;
78  x_step_limit = opt.x_step_limit;
79  reset = opt.reset;
80  }
81 
82  void set_default_options (void) { init (); }
83 
84  void set_absolute_tolerance (double val)
85  {
86  x_absolute_tolerance.resize (dim_vector (1, 1));
87  x_absolute_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
88  reset = true;
89  }
90 
92  { x_absolute_tolerance = val; reset = true; }
93 
94  void set_relative_tolerance (double val)
95  {
96  x_relative_tolerance.resize (dim_vector (1, 1));
97  x_relative_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
98  reset = true;
99  }
100 
102  { x_relative_tolerance = val; reset = true; }
103 
104  void set_initial_step_size (double val)
105  { x_initial_step_size = (val >= 0.0) ? val : -1.0; reset = true; }
106 
108  { x_maximum_order = val; reset = true; }
109 
110  void set_maximum_step_size (double val)
111  { x_maximum_step_size = (val >= 0.0) ? val : -1.0; reset = true; }
112 
114  { x_step_limit = (val >= 0) ? val : -1; reset = true; }
116  { return x_absolute_tolerance; }
117 
119  { return x_relative_tolerance; }
120 
121  double initial_step_size (void) const
122  { return x_initial_step_size; }
123 
125  { return x_maximum_order; }
126 
127  double maximum_step_size (void) const
128  { return x_maximum_step_size; }
129 
131  { return x_step_limit; }
132 
133 private:
134 
141 
142 protected:
143 
144  bool reset;
145 };
146 
147 #endif
double maximum_step_size(void) const
Definition: DASRT-opts.h:127
void set_relative_tolerance(double val)
Definition: DASRT-opts.h:94
octave_idx_type x_step_limit
Definition: DASRT-opts.h:140
void set_step_limit(octave_idx_type val)
Definition: DASRT-opts.h:113
void set_absolute_tolerance(double val)
Definition: DASRT-opts.h:84
octave_idx_type x_maximum_order
Definition: DASRT-opts.h:138
DASRT_options(const DASRT_options &opt)
Definition: DASRT-opts.h:30
void set_maximum_order(octave_idx_type val)
Definition: DASRT-opts.h:107
~DASRT_options(void)
Definition: DASRT-opts.h:56
void set_maximum_step_size(double val)
Definition: DASRT-opts.h:110
void set_relative_tolerance(const Array< double > &val)
Definition: DASRT-opts.h:101
ColumnVector & operator=(const ColumnVector &a)
Definition: dColVector.h:53
double x_maximum_step_size
Definition: DASRT-opts.h:139
octave_idx_type step_limit(void) const
Definition: DASRT-opts.h:130
Array< double > x_absolute_tolerance
Definition: DASRT-opts.h:135
void set_absolute_tolerance(const Array< double > &val)
Definition: DASRT-opts.h:91
Array< double > relative_tolerance(void) const
Definition: DASRT-opts.h:118
Array< double > x_relative_tolerance
Definition: DASRT-opts.h:136
Array< double > absolute_tolerance(void) const
Definition: DASRT-opts.h:115
octave_idx_type maximum_order(void) const
Definition: DASRT-opts.h:124
void set_initial_step_size(double val)
Definition: DASRT-opts.h:104
DASRT_options(void)
Definition: DASRT-opts.h:18
double x_initial_step_size
Definition: DASRT-opts.h:137
double initial_step_size(void) const
Definition: DASRT-opts.h:121
void init(void)
Definition: DASRT-opts.h:58
void set_options(const DASRT_options &opt)
Definition: DASRT-opts.h:71
void set_default_options(void)
Definition: DASRT-opts.h:82