1、NAG Library Function Documentnag_ip_mps_free (h02bvc)1 Purposenag_ip_mps_free (h02bvc) frees the memory allocated by nag_ip_mps_read (h02buc).2 Specification#include #include void nag_ip_mps_free (double *a, double *bl, double *bu, Nag_Boolean *intvar,double *cvec, double *x)3 Descriptionnag_ip_mps_
2、free (h02bvc) should be used in conjunction with nag_ip_mps_read (h02buc), which readsdata for an integer programming problem from an MPSX file, allocates several arrays, and populates themwith the data contained in the file. nag_ip_mps_free (h02bvc) is a utility provided for the convenientfreeing o
3、f this memory. It should be called in order to conserve memory which is no longer required, e.g.,following a call to nag_ip_bb (h02bbc) (which may be used to solve the problem defined by the MPSXfile). Any memory not freed will, of course, be freed when your program terminates.nag_ip_mps_free (h02bv
4、c) can be used to free a subset of the allocated arrays by passing null pointers forthose arguments which you do not wish to free.4 ReferencesNone.5 Arguments1: a double * Input/OutputOn entry: the nonzeros of the constraint matrix A, to be freed. If a or *a is a null pointer, no actionis taken.On e
5、xit:ifa is not null, *a is set to the null pointer.2: bl double * Input/OutputOn entry: the lower bounds of the problem variables and general constraints, to be freed. If bl or*bl is a null pointer, no action is taken.On exit:ifbl is not null, *bl is set to the null pointer.3: bu double * Input/Outp
6、utOn entry: the upper bounds of the problem variables and general constraints, to be freed. If bu or*bu is a null pointer, no action is taken.On exit:ifbu is not null, *bu is set to the null pointer.4: intvar Nag_Boolean * Input/OutputOn entry: the indicators as to which are the integer variables in
7、 the problem, to be freed. If intvaror *intvar is a null pointer, no action is taken.On exit:ifintvar is not null, *intvar is set to the null pointer.h Operations Research h02bvcNP3678/9 h02bvc.15: cvec double * Input/OutputOn entry: the coefficients, c, of the linear term of the objective function,
8、 to be freed. If cvec or*cvec is a null pointer, no action is taken.On exit:ifcvec is not null, *cvec is set to the null pointer.6: x double * Input/OutputOn entry: a set of initial values for the variables, to be freed. If x or *x is a null pointer no action istaken.On exit:ifx is not null, *x is s
9、et to the null pointer.6 Error Indicators and WarningsNone.7 AccuracyNot applicable.8 Further CommentsIn addition to allocating the memory freed by this function, nag_ip_mps_read (h02buc) also allocatesmemory to the crnames member of the options structure (if the structure is supplied as an argument
10、). Thefunction nag_ip_free (h02xzc) should be used to free this memory. You should not use the standard Cfunction free() for this purpose.9 ExampleFor an example of the use of nag_ip_mps_free (h02bvc) see the documentation for nag_ip_mps_read(h02buc)._h02bvc NAG Library Manualh02bvc.2 (last) NP3678/9