callable functions#
function lstr_initialize(T, data, control, status)
Set default control values and initialize private data
Parameters:
data |
holds private internal data |
control |
is a structure containing control information (see lstr_control_type) |
status |
is a scalar variable of type Int32 that gives the exit status from the package. Possible values are (currently):
|
function lstr_read_specfile(T, control, specfile)
Read the content of a specification file, and assign values associated with given keywords to the corresponding control parameters. An in-depth discussion of specification files is available, and a detailed list of keywords with associated default values is provided in $GALAHAD/src/lstr/LSTR.template. See also Table 2.1 in the Fortran documentation provided in $GALAHAD/doc/lstr.pdf for a list of how these keywords relate to the components of the control structure.
Parameters:
control |
is a structure containing control information (see lstr_control_type) |
specfile |
is a one-dimensional array of type Vararg{Cchar} that must give the name of the specification file |
function lstr_import_control(T, control, data, status)
Import control parameters prior to solution.
Parameters:
control |
is a structure whose members provide control parameters for the remaining procedures (see lstr_control_type) |
data |
holds private internal data |
status |
is a scalar variable of type Int32 that gives the exit status from the package. Possible values are (currently):
|
function lstr_solve_problem(T, data, status, m, n, radius, x, u, v)
Solve the trust-region least-squares problem using reverse communication.
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type Int32 that gives the entry and exit status from the package. This must be set to
Possible exit values are:
|
m |
is a scalar variable of type Int32 that holds the number of equations (i.e., rows of \(A\)), \(m > 0\) |
n |
is a scalar variable of type Int32 that holds the number of variables (i.e., columns of \(A\)), \(n > 0\) |
radius |
is a scalar of type T that holds the trust-region radius, \(\Delta > 0\) |
x |
is a one-dimensional array of size n and type T that holds the solution \(x\). The j-th component of |
u |
is a one-dimensional array of size m and type T that should be used and reset appropriately when status = 1 to 5 as directed by status. |
v |
is a one-dimensional array of size n and type T that should be used and reset appropriately when status = 1 to 5 as directed by status. |
function lstr_information(T, data, inform, status)
Provides output information
Parameters:
data |
holds private internal data |
inform |
is a structure containing output information (see lstr_inform_type) |
status |
is a scalar variable of type Int32 that gives the exit status from the package. Possible values are (currently):
|
function lstr_terminate(T, data, control, inform)
Deallocate all internal private storage
Parameters:
data |
holds private internal data |
control |
is a structure containing control information (see lstr_control_type) |
inform |
is a structure containing output information (see lstr_inform_type) |