- You are not required to modify anything in the program files.
- These instructions do NOT apply for Windows. They are intended for Unix-based systems like macOS and Linux.
- Please
DO NOTrun test cases with anempty lineat the end of .txt files, sinceit willcreate an imaginary box andmiss the expected result by one
Open your terminal of preference, preferably the VSCode integrated terminal with:
Ctrl + J
Type make to compile the library and gain access to the fully compiled executable called main.
We have a directory called catalogues, containing different sizes of test cases. You can run them by typing ./main <desired test case's relative path>.
Don't forget to run make clean after you are done using the code. Feel free to alter the main file and make use of our different available methods as you wish.
To visually comprehend the graphs created by your program, navigate to the main.c file. Ensure that, alongside init_graph and destroy_graph, the print_dot method is the only one not commented out. This setup is crucial for generating visual representations of your graphs.
Additionally, ensure that Graphviz is installed on your system, as it is required for graph visualization. If Graphviz is not installed, you can install it using the following commands:
-
On macOS, use Homebrew:
brew install graphviz -
On Linux (Debian/Ubuntu):
sudo apt-get install graphviz
The command make vis is specifically configured to visualize the graph described in the assignment. Should you wish to visualize different test cases, you can easily modify the corresponding commands in the Makefile. However, be mindful that graph visualization might not be as effective for very large test cases due to the limitations of the visualization tool.
The default make vis command should output this image:

If you have any questions or need further assistance, please contact alex.gabriel@edu.pucrs.br or r.sandler@edu.pucrs.br.