33 lines
1.1 KiB
C++
33 lines
1.1 KiB
C++
|
/*##############################################################################
|
||
|
## Author: Shaun Reed ##
|
||
|
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
|
||
|
## About: Driver program solving various C++ graph problems ##
|
||
|
## ##
|
||
|
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
|
||
|
################################################################################
|
||
|
*/
|
||
|
|
||
|
#include <iostream>
|
||
|
|
||
|
#include "lib-graph.hpp"
|
||
|
|
||
|
int main(const int argc, const char * argv[]) {
|
||
|
Simple::Graph g({ {1,2,3}, {2,3,4} });
|
||
|
g.Print();
|
||
|
std::cout << std::endl;
|
||
|
|
||
|
std::vector<int> graphA = {6,0,1,2,3,4,5};
|
||
|
std::vector<std::pair<int, int>> graphB = { {9, 2}, {2, 3}, {3, 1} };
|
||
|
std::vector<std::vector<int>> graphC = {{1}, {2, 3}, {3, 1, 0}};
|
||
|
g.ReadEdges(graphA);
|
||
|
g.Print();
|
||
|
std::cout << std::endl;
|
||
|
g.ReadEdges(graphB);
|
||
|
g.Print();
|
||
|
std::cout << std::endl;
|
||
|
g.ReadEdges(graphC);
|
||
|
g.Print();
|
||
|
|
||
|
return 0;
|
||
|
}
|