Tech Tip: Using Example Programs Within the NAG Libraries
Not sure how to get started with a NAG library routine?
We've included some code to speed up the process. With each of our library products NAG provide example programs and, where relevant, data files, exercising every routine in the library. Along with NAG's detailed documentation, the example programs can be useful program templates for you to edit to help you get started.
For example, you want to use NAG's nag_opt_nlp (e04ucc), an optimization routine for a non-linear objective function with linear and non-linear constraints contained in NAG's C Library. To access the source code of the example program relevant for your implementation and any data, simply look for these under the examples/source directory of your NAG Library installation. If the example program requires any input data, a suitable file will be found under examples/data. Expected results of running the program can be found under examples/results.
To make the process even easier, you should use tools supplied with the NAG Library that are designed to run a single example program. Typically on Linux-like systems these tools will have names like nag_example or nagc_example and will be located in the scripts directory of your library installation. On Microsoft Windows systems, the tools will probably be located in the batch folder and have names like nag_example_DLL.
For specific technical advice in using NAG's products, please contact our technical experts.
Return to Technical Tips & Hints index page.