-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into welsh_powell_coloring
- Loading branch information
Showing
133 changed files
with
6,663 additions
and
5,081 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: clang-format Check | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
formatting-check: | ||
name: Formatting Check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
path: | ||
- 'benchmark' | ||
- 'examples' | ||
- 'include/CXXGraph' | ||
- 'test' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run clang-format style check | ||
uses: jidicula/[email protected] | ||
with: | ||
clang-format-version: '16' | ||
check-path: ${{ matrix.path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ If you are interested, please contact us at [email protected] or contribute to | |
| :heavy_check_mark: | Release 1.1.0 | May 8, 2023 | | ||
| :heavy_check_mark: | Stable Release 2.0.0 | Jun 1, 2023 | | ||
| :heavy_check_mark: | Stable Release 3.0.0 | Nov 3, 2023 | | ||
| :heavy_check_mark: | Release 3.1.0 | Jan 9, 2023 | | ||
| :memo: | Introduce Hypergraph [#122](https://github.com/ZigRazor/CXXGraph/issues/122) | TBD | | ||
| :memo: | Stable Release 4.0.0 | TBD | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#include <benchmark/benchmark.h> | ||
|
||
#include <memory> | ||
|
||
#include "CXXGraph/CXXGraph.hpp" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#include <benchmark/benchmark.h> | ||
|
||
BENCHMARK_MAIN(); | ||
BENCHMARK_MAIN(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#include <math.h> | ||
#include <memory> | ||
|
||
#include <CXXGraph/CXXGraph.hpp> | ||
#include <memory> | ||
|
||
using std::make_shared; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#include <CXXGraph/CXXGraph.hpp> | ||
|
||
#include <memory> | ||
|
||
using std::make_shared; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cmake_minimum_required(VERSION 3.9) | ||
project(floydWarshallExample) | ||
|
||
# specify the C++ standard | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
|
||
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES /usr/local/lib ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}) | ||
|
||
add_executable(floyd_warshall floyd_warshall.cpp) | ||
target_include_directories(floyd_warshall PUBLIC "${CMAKE_SOURCE_DIR}/include") | ||
|
||
target_link_libraries(floyd_warshall | ||
pthread | ||
ssl | ||
crypto | ||
z) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#include <CXXGraph/CXXGraph.hpp> | ||
#include <memory> | ||
|
||
using std::make_shared; | ||
// example taken from | ||
// https://www.youtube.com/watch?v=B06q2yjr-Cc | ||
int main() { | ||
CXXGraph::Node<int> node0("0", 0); | ||
CXXGraph::Node<int> node1("1", 1); | ||
CXXGraph::Node<int> node2("2", 2); | ||
CXXGraph::Node<int> node3("3", 3); | ||
CXXGraph::Node<int> node4("4", 4); | ||
|
||
CXXGraph::UndirectedWeightedEdge<int> edge1(1, node0, node1, 1); | ||
CXXGraph::UndirectedWeightedEdge<int> edge2(2, node0, node2, 2); | ||
CXXGraph::UndirectedWeightedEdge<int> edge3(3, node1, node2, 6); | ||
CXXGraph::UndirectedWeightedEdge<int> edge4(4, node1, node3, 4); | ||
CXXGraph::UndirectedWeightedEdge<int> edge5(5, node2, node3, 5); | ||
CXXGraph::UndirectedWeightedEdge<int> edge6(6, node3, node4, 3); | ||
|
||
CXXGraph::T_EdgeSet<int> edgeSet; | ||
edgeSet.insert(make_shared<CXXGraph::UndirectedWeightedEdge<int>>(edge1)); | ||
edgeSet.insert(make_shared<CXXGraph::UndirectedWeightedEdge<int>>(edge2)); | ||
edgeSet.insert(make_shared<CXXGraph::UndirectedWeightedEdge<int>>(edge3)); | ||
edgeSet.insert(make_shared<CXXGraph::UndirectedWeightedEdge<int>>(edge4)); | ||
edgeSet.insert(make_shared<CXXGraph::UndirectedWeightedEdge<int>>(edge5)); | ||
edgeSet.insert(make_shared<CXXGraph::UndirectedWeightedEdge<int>>(edge6)); | ||
// Can print out the edges for debugging | ||
std::cout << edge1 << "\n"; | ||
std::cout << edge2 << "\n"; | ||
std::cout << edge3 << "\n"; | ||
std::cout << edge4 << "\n"; | ||
std::cout << edge5 << "\n"; | ||
std::cout << edge6 << "\n"; | ||
|
||
CXXGraph::Graph<int> graph(edgeSet); | ||
CXXGraph::FWResult res = graph.floydWarshall(); | ||
std::cout << "floyd Warshall Result: " | ||
<< "\n"; | ||
for (auto i : res.result) { | ||
std::cout << "distance of: " << i.first.first << " " << i.first.second | ||
<< " = " << i.second << "\n"; | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cmake_minimum_required(VERSION 3.9) | ||
project(PrimExample) | ||
|
||
# specify the C++ standard | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
|
||
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES /usr/local/lib ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}) | ||
|
||
add_executable(prim_example prim_example.cpp) | ||
target_include_directories(prim_example PUBLIC "${CMAKE_SOURCE_DIR}/include") | ||
|
||
target_link_libraries(prim_example | ||
pthread | ||
ssl | ||
crypto | ||
z) |
Oops, something went wrong.