rusito-23 / Wahlaan

Greedy algorithm implementation for graph coloring using plain C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wahlaan πŸ€“

Discrete Math II 2019 - Famaf, Argentina. Uses the Greedy algorithm for Graph Coloring with C.

Test Suites

  • SANITY

      Runs several UnitTests over the required functions.
    
  • PERFORMANCE

      Runs several actions, saving the partial time for each of one:
    
    • Graph reading
    • Greedy with natural order
    • WelshPowell Re-Ordering and Greedy
    • 100 SwitchVertices
    • 1000 RMBCs + Greedy
  • COLOR

      Shows the results of Greedy with the following orders:
    
    • Natural
    • Welsh Powell
    • 100 SwitchVΓ©rtices
    • 100 RMBCs
  • BIPARTITO

      Shows the results of running Greedy and Bipartite over the graph.
    

Makefile πŸ”›

The makefile provides the following targets:

  • make <suite> GRAPH=Path/to/Graph Suite over a Graph

    Example: make sanity GRAPH=Graphs/K4.txt

  • make <suite>-all FOLDER=Path/To/Folder Suite over a folder of Graphs

    Ejemplo: make performance-all FOLDER=Graphs/Performance

  • make <suite>-valgrind GRAPH=Path/To/Graph Suite over a Graph with Valgrind results:

    make bipartito-valgrind GRAPH=Graphs/Bipartito.txt VALGRIND='valgrind --leak-check=full --show-leak-kinds=all'

Structure

.
β”œβ”€β”€ Graphs
β”‚   β”œβ”€β”€ Bipartite
β”‚   β”œβ”€β”€ Color
β”‚   β”‚   └── Small graphs to check COLOR suite
β”‚   β”œβ”€β”€ Complete
β”‚   β”‚   └── Complete Graphs
β”‚   └── Performance
β”‚       └── Large graphs to test the PERFORMACE suite
β”œβ”€β”€ Makefile
β”œβ”€β”€ README.md
β”œβ”€β”€ Test
β”‚   β”œβ”€β”€ PrintTests.c
β”‚   β”œβ”€β”€ TestSuites.c
β”‚   β”œβ”€β”€ Tests.h
β”‚   β”œβ”€β”€ TestsMultiples.c
β”‚   └── UnitTests.c
β”œβ”€β”€ Wahlaan
β”‚   β”œβ”€β”€ Project .c files
β”‚   └── Rii.h
└── main.c

About

Greedy algorithm implementation for graph coloring using plain C

License:MIT License


Languages

Language:C 81.3%Language:C++ 13.3%Language:Makefile 5.3%