-
Book Overview & Buying
-
Table Of Contents
The C++ Programmer's Mindset
By :
The final step of building our solution is to put all the individual pieces together into a single application. We’ve already set up most of the framework but we need to complete the run_and_report function in main.cpp with the file reading and clustering components. However, as we have developed these other components, we have encountered several other parameters that we might want to add to the command-line interface as configurable parameters. Certainly, this should be the case with the
range for the clustering, the maximum number of iterations to be used in finding the clustering, and the number of repetitions to be used in computing each clustering. Thanks to our careful structuring earlier, we can easily add these parameters to the interface with sensible defaults.
To add new configuration options to the command-line arguments, we just need to add the corresponding lines following the options.add_options() call in the parse_config function...