overview of functions provided#
// typedefs typedef float spc_; typedef double rpc_; typedef int ipc_; // structs struct llst_control_type; struct llst_history_type; struct llst_inform_type; struct llst_time_type; // global functions void llst_initialize( void **data, struct llst_control_type* control, ipc_ *status ); void llst_read_specfile( struct llst_control_type* control, const char specfile[] ); void llst_import( struct llst_control_type* control, void **data, ipc_ *status, ipc_ m, ipc_ n, const char A_type[], ipc_ A_ne, const ipc_ A_row[], const ipc_ A_col[], const ipc_ A_ptr[] ); void llst_import_scaling( struct llst_control_type* control, void **data, ipc_ *status, ipc_ n, const char S_type[], ipc_ S_ne, const ipc_ S_row[], const ipc_ S_col[], const ipc_ S_ptr[] ); void llst_reset_control( struct llst_control_type* control, void **data, ipc_ *status ); void llst_solve_problem( void **data, ipc_ *status, ipc_ m, ipc_ n, const rpc_ radius, ipc_ A_ne, const rpc_ A_val[], const rpc_ b[], rpc_ x[], ipc_ S_ne, const rpc_ S_val[] ); void llst_information(void **data, struct llst_inform_type* inform, ipc_ *status); void llst_terminate( void **data, struct llst_control_type* control, struct llst_inform_type* inform );
typedefs#
typedef float spc_
spc_
is real single precision
typedef double rpc_
rpc_
is the real working precision used, but may be changed to float
by
defining the preprocessor variable REAL_32
or (if supported) to
__real128
using the variable REAL_128
.
typedef int ipc_
ipc_
is the default integer word length used, but may be changed to
int64_t
by defining the preprocessor variable INTEGER_64
.
function calls#
void llst_initialize( void **data, struct llst_control_type* control, ipc_ *status )
Set default control values and initialize private data
Parameters:
data |
holds private internal data |
control |
is a struct containing control information (see llst_control_type) |
status |
is a scalar variable of type ipc_, that gives the exit status from the package. Possible values are (currently):
|
void llst_read_specfile( struct llst_control_type* control, const char 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/llst/LLST.template. See also Table 2.1 in the Fortran documentation provided in $GALAHAD/doc/llst.pdf for a list of how these keywords relate to the components of the control structure.
Parameters:
control |
is a struct containing control information (see llst_control_type) |
specfile |
is a character string containing the name of the specification file |
void llst_import( struct llst_control_type* control, void **data, ipc_ *status, ipc_ m, ipc_ n, const char A_type[], ipc_ A_ne, const ipc_ A_row[], const ipc_ A_col[], const ipc_ A_ptr[] )
Import problem data into internal storage prior to solution.
Parameters:
control |
is a struct whose members provide control paramters for the remaining prcedures (see llst_control_type) |
data |
holds private internal data |
status |
is a scalar variable of type ipc_, that gives the exit status from the package. Possible values are:
|
m |
is a scalar variable of type ipc_, that holds the number of residuals, i.e., the number of rows of |
n |
is a scalar variable of type ipc_, that holds the number of variables, i.e., the number of columns of |
A_type |
is a one-dimensional array of type char that specifies the unsymmetric storage scheme used for the constraint Jacobian, |
A_ne |
is a scalar variable of type ipc_, that holds the number of entries in |
A_row |
is a one-dimensional array of size A_ne and type ipc_, that holds the row indices of |
A_col |
is a one-dimensional array of size A_ne and type ipc_, that holds the column indices of |
A_ptr |
is a one-dimensional array of size n+1 and type ipc_, that holds the starting position of each row of |
void llst_import_scaling( struct llst_control_type* control, void **data, ipc_ *status, ipc_ n, const char S_type[], ipc_ S_ne, const ipc_ S_row[], const ipc_ S_col[], const ipc_ S_ptr[] )
Import the scaling matrix
Parameters:
control |
is a struct whose members provide control paramters for the remaining prcedures (see llst_control_type) |
data |
holds private internal data |
status |
is a scalar variable of type ipc_, that gives the exit status from the package. Possible values are:
|
n |
is a scalar variable of type ipc_, that holds the number of variables, i.e., the number of rows and columns of |
S_type |
is a one-dimensional array of type char that specifies the symmetric storage scheme used for the matrix |
S_ne |
is a scalar variable of type ipc_, that holds the number of entries in the lower triangular part of |
S_row |
is a one-dimensional array of size S_ne and type ipc_, that holds the row indices of the lower triangular part of |
S_col |
is a one-dimensional array of size S_ne and type ipc_, that holds the column indices of the lower triangular part of |
S_ptr |
is a one-dimensional array of size n+1 and type ipc_, that holds the starting position of each row of the lower triangular part of |
void llst_reset_control( struct llst_control_type* control, void **data, ipc_ *status )
Reset control parameters after import if required.
Parameters:
control |
is a struct whose members provide control paramters for the remaining prcedures (see llst_control_type) |
data |
holds private internal data |
status |
is a scalar variable of type ipc_, that gives the exit status from the package. Possible values are:
|
void llst_solve_problem( void **data, ipc_ *status, ipc_ m, ipc_ n, const rpc_ radius, ipc_ A_ne, const rpc_ A_val[], const rpc_ b[], rpc_ x[], ipc_ S_ne, const rpc_ S_val[] )
Solve the trust-region problem.
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type ipc_, that gives the entry and exit status from the package. Possible exit values are:
|
m |
is a scalar variable of type ipc_, that holds the number of residuals |
n |
is a scalar variable of type ipc_, that holds the number of variables |
radius |
is a scalar of type rpc_, that holds the trust-region radius, |
A_ne |
is a scalar variable of type ipc_, that holds the number of entries in the observation matrix |
A_val |
is a one-dimensional array of size A_ne and type rpc_, that holds the values of the entries of the observation matrix |
b |
is a one-dimensional array of size m and type rpc_, that holds the values |
x |
is a one-dimensional array of size n and type rpc_, that holds the values |
S_ne |
is a scalar variable of type ipc_, that holds the number of entries in the scaling matrix |
S_val |
is a one-dimensional array of size S_ne and type rpc_, that holds the values of the entries of the scaling matrix |
void llst_information(void **data, struct llst_inform_type* inform, ipc_ *status)
Provides output information
Parameters:
data |
holds private internal data |
inform |
is a struct containing output information (see llst_inform_type) |
status |
is a scalar variable of type ipc_, that gives the exit status from the package. Possible values are (currently):
|
void llst_terminate( void **data, struct llst_control_type* control, struct llst_inform_type* inform )
Deallocate all internal private storage
Parameters:
data |
holds private internal data |
control |
is a struct containing control information (see llst_control_type) |
inform |
is a struct containing output information (see llst_inform_type) |