In order to add a graph generating algorithm to the library, use the
following procedure:
- Add the file(s)
containing the code to the 17 directory.
A generator of random graphs is shown in Figure~#fig:gen-eg#7160>.
<#7161#>
Figure 2.4:
An example graph generating algorithm
#figure7161# |
<#7161#>
- Once the code has been written and included, edit the file
18 in the same directory and include the filename
in the SOURCES.cpp macro so that the file will be compiled by the
make process.
- Edit the file 19 in the directory
20 to include a prototype
for the new generator routine.
- Create a wrapper routine for the new generator algorithm in the
21 directory. This
wrapper may be virtually identical to most other wrappers in that
directory, which therefore serve as a good starting point.
Figure~#fig:gen-wrapper-eg#7169> contains an example wrapper code.
<#7170#>
Figure 2.5:
An example wrapper for a graph generating algorithm
#figure7170# |
<#7170#>
- Edit the file 22 in the same
directory, and add the wrapper filename to the SOURCES macro.
- Edit the file 23 in the directory
24. Include the prototype for
the new wrapper at the top of the file and a call to it
in the STk_generator_init() function.
- Edit the file 25 in the directory
26 and add an option under the ``Generate''
menu for the new generation routine. This will consist of adding
a new line to the ....