Giter VIP home page Giter VIP logo

cs3364-groupproject's Introduction

CS3364-GroupProject

Build Test

Getting Started

The first thing you need to do is install meson and ninja, which will handle all of the building for you. The easiest way to do this is to just run:

pip install meson ninja

Once you have installed meson and ninja, run the following command from the root directory of the repository:

python build.py

If everything builds correctly, you should be set to run the program, which can be found in the build directory.

Usage

Command Syntax

./Task2 <subcommand> [options]

Subcommands

1. MST Image Generation

Generate an image of the minimum spanning tree (MST) for a given graph.

./Task2 mst -g <path_to_graph_file> -o <output_image.png> -a <algorithm>
Options:

-g, --graph: Specify the path to the input graph file.

-o, --output: Specify the output image file name (must end with .png).

-a, --algo: Select the algorithm (kruskal or prim). Default is kruskal.

2. Graph Image Generation

Create an image of the original graph.

./Task2 graph -g <path_to_graph_file> -o <output_image.png>
Options:

-g, --graph: Specify the path to the input graph file.

-o, --output: Specify the output image file name (must end with .png).

3. Benchmarking

Run performance benchmarks for the MST algorithms and output the results to a CSV file.

./Task2 benchmark -o <output_file.csv>
Options:

-o, --output: Specify the output CSV file name. Default is output.csv.

Examples

Generating an MST image using Kruskal's algorithm:

./Task2 mst -g example.graph -o mst_output.png -a kruskal

Creating a graph image:

./Task2 graph -g example.graph -o graph_output.png

Running benchmarks and saving the results:

./Task2 -o benchmark_results.csv

Additional Information

Ensure Graphviz is installed and properly configured on your system as it is required for the image generation features.

Editing the Source Code

The main files you should be editing are the implementations of Prim's Algorithm and Kruskal's Algorithm

You can also edit the header files for each one too!

There is also a shared header file called Graph that has been created, and contains the Graph class that should be shared by both algorithms for testing purposes.

Testing

When you are ready to test the algorithms, run the following, you should see what results where passed, and which ones were not.

python test.py

When you submit a commit, it will also run the tests.

cs3364-groupproject's People

Contributors

jaxcksn avatar ogecuz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.