4 #if ! defined (octave_DASSL_options_h)
5 #define octave_DASSL_options_h 1
20 : m_absolute_tolerance (),
21 m_relative_tolerance (),
22 m_compute_consistent_initial_condition (),
23 m_enforce_nonnegativity_constraints (),
24 m_initial_step_size (),
26 m_maximum_step_size (),
34 : m_absolute_tolerance (opt.m_absolute_tolerance),
35 m_relative_tolerance (opt.m_relative_tolerance),
36 m_compute_consistent_initial_condition (opt.m_compute_consistent_initial_condition),
37 m_enforce_nonnegativity_constraints (opt.m_enforce_nonnegativity_constraints),
38 m_initial_step_size (opt.m_initial_step_size),
39 m_maximum_order (opt.m_maximum_order),
40 m_maximum_step_size (opt.m_maximum_step_size),
41 m_step_limit (opt.m_step_limit),
49 m_absolute_tolerance = opt.m_absolute_tolerance;
50 m_relative_tolerance = opt.m_relative_tolerance;
51 m_compute_consistent_initial_condition = opt.m_compute_consistent_initial_condition;
52 m_enforce_nonnegativity_constraints = opt.m_enforce_nonnegativity_constraints;
53 m_initial_step_size = opt.m_initial_step_size;
54 m_maximum_order = opt.m_maximum_order;
55 m_maximum_step_size = opt.m_maximum_step_size;
56 m_step_limit = opt.m_step_limit;
67 m_absolute_tolerance.resize (
dim_vector (1, 1));
68 m_absolute_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
69 m_relative_tolerance.resize (
dim_vector (1, 1));
70 m_relative_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
71 m_compute_consistent_initial_condition = 0;
72 m_enforce_nonnegativity_constraints = 0;
73 m_initial_step_size = -1.0;
75 m_maximum_step_size = -1.0;
82 m_absolute_tolerance = opt.m_absolute_tolerance;
83 m_relative_tolerance = opt.m_relative_tolerance;
84 m_compute_consistent_initial_condition = opt.m_compute_consistent_initial_condition;
85 m_enforce_nonnegativity_constraints = opt.m_enforce_nonnegativity_constraints;
86 m_initial_step_size = opt.m_initial_step_size;
87 m_maximum_order = opt.m_maximum_order;
88 m_maximum_step_size = opt.m_maximum_step_size;
89 m_step_limit = opt.m_step_limit;
97 m_absolute_tolerance.resize (
dim_vector (1, 1));
98 m_absolute_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
103 { m_absolute_tolerance = val; m_reset =
true; }
107 m_relative_tolerance.resize (
dim_vector (1, 1));
108 m_relative_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
113 { m_relative_tolerance = val; m_reset =
true; }
116 { m_compute_consistent_initial_condition = val; m_reset =
true; }
119 { m_enforce_nonnegativity_constraints = val; m_reset =
true; }
122 { m_initial_step_size = (val >= 0.0) ? val : -1.0; m_reset =
true; }
125 { m_maximum_order = val; m_reset =
true; }
128 { m_maximum_step_size = (val >= 0.0) ? val : -1.0; m_reset =
true; }
131 { m_step_limit = (val >= 0) ? val : -1; m_reset =
true; }
133 {
return m_absolute_tolerance; }
136 {
return m_relative_tolerance; }
139 {
return m_compute_consistent_initial_condition; }
142 {
return m_enforce_nonnegativity_constraints; }
145 {
return m_initial_step_size; }
148 {
return m_maximum_order; }
151 {
return m_maximum_step_size; }
154 {
return m_step_limit; }
162 double m_initial_step_size;
164 double m_maximum_step_size;
void set_enforce_nonnegativity_constraints(octave_idx_type val)
Array< double > relative_tolerance() const
octave_idx_type compute_consistent_initial_condition() const
octave_idx_type maximum_order() const
void set_maximum_step_size(double val)
void set_absolute_tolerance(const Array< double > &val)
void set_maximum_order(octave_idx_type val)
Array< double > absolute_tolerance() const
void set_relative_tolerance(const Array< double > &val)
double initial_step_size() const
void set_options(const DASSL_options &opt)
void set_step_limit(octave_idx_type val)
DASSL_options(const DASSL_options &opt)
void set_relative_tolerance(double val)
void set_default_options()
double maximum_step_size() const
void set_compute_consistent_initial_condition(octave_idx_type val)
octave_idx_type enforce_nonnegativity_constraints() const
octave_idx_type step_limit() const
void set_initial_step_size(double val)
void set_absolute_tolerance(double val)
Vector representing the dimensions (size) of an Array.