hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_opt_nlp2_option_double_get (e04wl)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_opt_nlp2_option_double_get (e04wl) is used to get the value of a double optional parameter. nag_opt_nlp2_option_double_get (e04wl) can be used before or after calling nag_opt_nlp2_solve (e04wd).

Syntax

[rvalue, iw, rw, ifail] = e04wl(string, iw, rw)
[rvalue, iw, rw, ifail] = nag_opt_nlp2_option_double_get(string, iw, rw)

Description

nag_opt_nlp2_option_double_get (e04wl) obtains the current value of a double option. For example
[factol, iw, rw, ifail] = e04wl('LU Factor Tolerance', iw, rw);
will result in the value of the optional parameter LU Factor Tolerance being output in factol.
A complete list of optional parameters, their abbreviations, synonyms and default values is given in Optional Parameters in nag_opt_nlp2_solve (e04wd).

References

None.

Parameters

Compulsory Input Parameters

1:     string – string
A single valid keyword of a double optional parameter (as described in Optional Parameters in nag_opt_nlp2_solve (e04wd)).
2:     iw: int64int32nag_int array
The dimension of the array iw must be at least leniw (see nag_opt_nlp2_init (e04wc))
3:     rw: – double array
The dimension of the array rw must be at least lenrw (see nag_opt_nlp2_init (e04wc))

Optional Input Parameters

None.

Output Parameters

1:     rvalue – double scalar
The double value associated with the keyword in string.
2:     iw: int64int32nag_int array
The dimension of the array iw will be leniw (see nag_opt_nlp2_init (e04wc))
3:     rw: – double array
The dimension of the array rw will be lenrw (see nag_opt_nlp2_init (e04wc))
4:     ifail int64int32nag_int scalar
ifail=0 unless the function detects an error (see Error Indicators and Warnings).

Error Indicators and Warnings

Errors or warnings detected by the function:
   ifail=1
The initialization function nag_opt_nlp2_init (e04wc) has not been called.
   ifail=2
The supplied option is invalid. Check that the keywords are neither ambiguous nor misspelt.
   ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
   ifail=-399
Your licence key may have expired or may not have been installed correctly.
   ifail=-999
Dynamic memory allocation failed.

Accuracy

Not applicable.

Further Comments

None.

Example

function e04wl_example


fprintf('e04wl example results\n\n');

string = 'LU Factor Tolerance';
factol = 1e-3;

% Initialize
[iw, rw, ifail] = e04wc;
% Set option
[iw, rw, ifail] = e04wh( ...
                         string, factol, iw, rw);
% Get option value
[rvalue, iw, rw, ifail] = e04wl( ...
                                 string, iw, rw);

fprintf('%s has been set to %10.2e\n', string, rvalue);


e04wl example results

LU Factor Tolerance has been set to   1.00e-03

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015