4 #if !defined (octave_DASSL_options_h)
5 #define octave_DASSL_options_h 1
19 : x_absolute_tolerance (),
20 x_relative_tolerance (),
21 x_compute_consistent_initial_condition (),
22 x_enforce_nonnegativity_constraints (),
23 x_initial_step_size (),
25 x_maximum_step_size (),
33 : x_absolute_tolerance (opt.x_absolute_tolerance),
34 x_relative_tolerance (opt.x_relative_tolerance),
35 x_compute_consistent_initial_condition (opt.x_compute_consistent_initial_condition),
36 x_enforce_nonnegativity_constraints (opt.x_enforce_nonnegativity_constraints),
37 x_initial_step_size (opt.x_initial_step_size),
38 x_maximum_order (opt.x_maximum_order),
39 x_maximum_step_size (opt.x_maximum_step_size),
40 x_step_limit (opt.x_step_limit),
66 x_absolute_tolerance.resize (
dim_vector (1, 1));
67 x_absolute_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
68 x_relative_tolerance.resize (
dim_vector (1, 1));
69 x_relative_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
70 x_initial_step_size = -1.0;
72 x_maximum_step_size = -1.0;
92 void set_absolute_tolerance (
double val)
94 x_absolute_tolerance.resize (
dim_vector (1, 1));
95 x_absolute_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
100 { x_absolute_tolerance = val; reset =
true; }
102 void set_relative_tolerance (
double val)
105 x_relative_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
110 { x_relative_tolerance = val; reset =
true; }
113 { x_compute_consistent_initial_condition = val; reset =
true; }
116 { x_enforce_nonnegativity_constraints = val; reset =
true; }
118 void set_initial_step_size (
double val)
119 { x_initial_step_size = (val >= 0.0) ? val : -1.0; reset =
true; }
122 { x_maximum_order = val; reset =
true; }
124 void set_maximum_step_size (
double val)
125 { x_maximum_step_size = (val >= 0.0) ? val : -1.0; reset =
true; }
128 { x_step_limit = (val >= 0) ? val : -1; reset =
true; }
130 {
return x_absolute_tolerance; }
133 {
return x_relative_tolerance; }
136 {
return x_compute_consistent_initial_condition; }
139 {
return x_enforce_nonnegativity_constraints; }
141 double initial_step_size (
void)
const
142 {
return x_initial_step_size; }
145 {
return x_maximum_order; }
147 double maximum_step_size (
void)
const
148 {
return x_maximum_step_size; }
151 {
return x_step_limit; }