Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Instructions to Run the Code

Table of Contents

Introduction

  • 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 NOT run test cases with an empty line at the end of .txt files, since it will create an imaginary box and miss the expected result by one

Opening the Terminal

Open your terminal of preference, preferably the VSCode integrated terminal with:
Ctrl + J

Compiling the Code

Type make to compile the library and gain access to the fully compiled executable called main.

Running Test Cases

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>.

Cleaning Up

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.

Visualizing the Assignments

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.

Output Image

The default make vis command should output this image:

Visualization Output

Conclusion

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

About

FInding the longest nesting sequence of boxes in a DAG (directed acyclic graph)

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages