callable functions#
function lhs_initialize(T, data, control, inform)
Set default control values and initialize private data
Parameters:
data |
holds private internal data |
control |
is a structure containing control information (see lhs_control_type) |
inform |
is a structure containing output information (see lhs_inform_type) |
function lhs_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/lhs/LHS.template. See also Table 2.1 in the Fortran documentation provided in $GALAHAD/doc/lhs.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 lhs_control_type) |
specfile |
is a one-dimensional array of type Vararg{Cchar} that must give the name of the specification file |
function lhs_ihs(T, n_dimen, n_points, seed, X, control, inform, data)
The improved distributed hyper-cube sampling algorithm.
Discussion:
n_points points in an n_dimen dimensional Latin hyper-cube are to be selected. Each of the coordinate dimensions is discretized to the values 1 through n. The points are to be chosen in such a way that no two points have any coordinate value in common. This is a standard Latin hypercube requirement, and there are many solutions.
This algorithm differs in that it tries to pick a solution which has the property that the points are “spread out” as evenly as possible. It does this by determining an optimal even spacing, and using the DUPLICATION factor to allow it to choose the best of the various options available to it.
Reference:
Brian Beachkofski, Ramana Grandhi, Improved Distributed Hypercube Sampling, American Institute of Aeronautics and Astronautics Paper 2002-1274
Parameters:
n_dimen |
is a scalar variable of type int that specifies the spatial dimension |
n_points |
is a scalar variable of type int that specifies the number of points to be generated |
seed |
is a scalar variable of type Int32 that gives a seed for the random number generator used |
X |
is an array variable of type int with dimensions [n_dimen][n_points] that gives the hyper-cube points |
control |
is a structure containing control information (see lhs_control_type) |
inform |
is a structure containing output information (see lhs_inform_type) |
data |
|
function lhs_get_seed(T, seed)
Get a seed for the random number generator.
Parameters:
seed |
is a scalar variable of type int that gives the pseudorandom seed value. |
function lhs_information(T, data, inform, status)
Provides output information
Parameters:
data |
holds private internal data |
inform |
is a structure containing output information (see lhs_inform_type) |
status |
is a scalar variable of type Int32 that gives the exit status from the package. Possible values are (currently):
|
function lhs_terminate(T, data, control, inform)
Deallocate all internal private storage
Parameters:
data |
holds private internal data |
control |
is a structure containing control information (see lhs_control_type) |
inform |
is a structure containing output information (see lhs_inform_type) |