12 #include "DASRT-opts.h"
37 {
"absolute tolerance",
38 {
"absolute",
"tolerance",
nullptr,
nullptr, },
39 { 1, 0, 0, 0, }, 1, },
41 {
"relative tolerance",
42 {
"relative",
"tolerance",
nullptr,
nullptr, },
43 { 1, 0, 0, 0, }, 1, },
45 {
"initial step size",
46 {
"initial",
"step",
"size",
nullptr, },
47 { 1, 0, 0, 0, }, 1, },
50 {
"maximum",
"order",
nullptr,
nullptr, },
51 { 1, 1, 0, 0, }, 2, },
53 {
"maximum step size",
54 {
"maximum",
"step",
"size",
nullptr, },
55 { 1, 1, 0, 0, }, 2, },
58 {
"step",
"limit",
nullptr,
nullptr, },
59 { 1, 0, 0, 0, }, 1, },
65 std::ostringstream buf;
68 <<
"Options for DASRT include:\n\n"
70 <<
" ------- -----\n";
83 if (val.
numel () == 1)
105 if (val.
numel () == 1)
107 os << val(0) <<
"\n";
175 keyword, list[0].min_toks_to_match,
MAX_TOKENS))
182 keyword, list[1].min_toks_to_match,
MAX_TOKENS))
189 keyword, list[2].min_toks_to_match,
MAX_TOKENS))
196 keyword, list[3].min_toks_to_match,
MAX_TOKENS))
203 keyword, list[4].min_toks_to_match,
MAX_TOKENS))
210 keyword, list[5].min_toks_to_match,
MAX_TOKENS))
218 warning (
"dasrt_options: no match for `%s'", keyword.c_str ());
230 keyword, list[0].min_toks_to_match,
MAX_TOKENS))
234 if (val.
numel () == 1)
244 keyword, list[1].min_toks_to_match,
MAX_TOKENS))
248 if (val.
numel () == 1)
258 keyword, list[2].min_toks_to_match,
MAX_TOKENS))
265 keyword, list[3].min_toks_to_match,
MAX_TOKENS))
269 retval =
static_cast<double> (val);
272 keyword, list[4].min_toks_to_match,
MAX_TOKENS))
279 keyword, list[5].min_toks_to_match,
MAX_TOKENS))
283 retval =
static_cast<double> (val);
287 warning (
"dasrt_options: no match for `%s'", keyword.c_str ());
295 DEFUN (dasrt_options, args, ,
354 int nargin = args.
length ();
365 std::string keyword = args(0).xstring_value (
"dasrt_options: expecting keyword as first argument");
static void print_DASRT_options(std::ostream &os)
static octave_value_list show_DASRT_options(const std::string &keyword)
static DASRT_options dasrt_opts
static DASRT_options_struct DASRT_options_table[]
static void set_DASRT_options(const std::string &keyword, const octave_value &val)
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
octave_idx_type length(void) const
int int_value(bool req_int=false, bool frc_str_conv=false) const
OCTINTERP_API Array< double > vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
double double_value(bool frc_str_conv=false) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void warning(const char *fmt,...)
class OCTAVE_API ColumnVector
void octave_print_internal(std::ostream &os, const float_display_format &fmt, bool d, bool pr_as_read_syntax)
int keyword_almost_match(const char *const *std, int *min_len, const std::string &s, int min_toks_to_match, int max_toks)