Skip to content

Commit

Permalink
Update references
Browse files Browse the repository at this point in the history
  • Loading branch information
nrkramer committed May 8, 2023
1 parent f63ca8e commit cc2b0a7
Show file tree
Hide file tree
Showing 56 changed files with 2,425 additions and 2,425 deletions.
12 changes: 6 additions & 6 deletions benchmark/BFS_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void BFS_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand All @@ -31,10 +31,10 @@ static void BFS_FromReadedCitHep(benchmark::State &state) {
BENCHMARK(BFS_FromReadedCitHep);

static void PSEUDO_CONCURRENCY_BFS_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand All @@ -59,10 +59,10 @@ static void PSEUDO_CONCURRENCY_BFS_FromReadedCitHep(benchmark::State &state) {
BENCHMARK(PSEUDO_CONCURRENCY_BFS_FromReadedCitHep);

static void CONCURRENCY_BFS_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
4 changes: 2 additions & 2 deletions benchmark/BellmanFord_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void BellmanFord_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
4 changes: 2 additions & 2 deletions benchmark/Boruvka_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void Boruvka_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
8 changes: 4 additions & 4 deletions benchmark/Connectivity_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void Connectivity_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand All @@ -30,10 +30,10 @@ static void Connectivity_FromReadedCitHep(benchmark::State &state) {
BENCHMARK(Connectivity_FromReadedCitHep);

static void StrongConnectivity_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
8 changes: 4 additions & 4 deletions benchmark/CycleCheck_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void CycleCheckBFS_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand All @@ -30,10 +30,10 @@ static void CycleCheckBFS_FromReadedCitHep(benchmark::State &state) {
BENCHMARK(CycleCheckBFS_FromReadedCitHep);

static void CycleCheckDFS_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
4 changes: 2 additions & 2 deletions benchmark/DFS_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void DFS_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
4 changes: 2 additions & 2 deletions benchmark/Dial_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void Dial_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
4 changes: 2 additions & 2 deletions benchmark/Dijkstra_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void Dijkstra_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
10 changes: 5 additions & 5 deletions benchmark/Edge_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static void BM_EdgeCreation(benchmark::State &state) {
auto n1 = *nodes.at(0);
auto n2 = *nodes.at(1);
for (auto _ : state) {
CXXGRAPH::Edge<int> e(1, n1, n2);
CXXGraph::Edge<int> e(1, n1, n2);
}
}

Expand All @@ -18,9 +18,9 @@ static void EdgeCreationDestruction_new_delete(benchmark::State &state) {
auto nodes = generateRandomNodes(2, 2);
auto n1 = *nodes.at(0);
auto n2 = *nodes.at(1);
CXXGRAPH::Edge<int> *e;
CXXGraph::Edge<int> *e;
for (auto _ : state) {
e = new CXXGRAPH::Edge<int>(1, n1, n2);
e = new CXXGraph::Edge<int>(1, n1, n2);
delete e;
}
}
Expand All @@ -31,7 +31,7 @@ static void EdgeGetId(benchmark::State &state) {
auto nodes = generateRandomNodes(2, 2);
auto n1 = *nodes.at(0);
auto n2 = *nodes.at(1);
CXXGRAPH::Edge<int> e(1, n1, n2);
CXXGraph::Edge<int> e(1, n1, n2);
for (auto _ : state) {
e.getId();
}
Expand All @@ -42,7 +42,7 @@ static void NodeGetNodePair(benchmark::State &state) {
auto nodes = generateRandomNodes(2, 2);
auto n1 = *nodes.at(0);
auto n2 = *nodes.at(1);
CXXGRAPH::Edge<int> e(1, n1, n2);
CXXGraph::Edge<int> e(1, n1, n2);
for (auto _ : state) {
e.getNodePair();
}
Expand Down
4 changes: 2 additions & 2 deletions benchmark/EulerPath_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void EulerPath_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = undirectedEdges.begin();
auto range_end = undirectedEdges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
82 changes: 41 additions & 41 deletions benchmark/FloydWarshall_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,86 +5,86 @@

// https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm#Example
static void BM_FWDirected(benchmark::State &state) {
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::Node<int> node1("1", 1);
CXXGraph::Node<int> node2("2", 2);
CXXGraph::Node<int> node3("3", 3);
CXXGraph::Node<int> node4("4", 4);

CXXGRAPH::DirectedWeightedEdge<int> edge1(1, node2, node1, 4);
CXXGRAPH::DirectedWeightedEdge<int> edge2(2, node1, node3, -2);
CXXGRAPH::DirectedWeightedEdge<int> edge3(3, node3, node4, 2);
CXXGRAPH::DirectedWeightedEdge<int> edge4(4, node4, node2, -1);
CXXGRAPH::DirectedWeightedEdge<int> edge5(3, node2, node3, 3);
CXXGraph::DirectedWeightedEdge<int> edge1(1, node2, node1, 4);
CXXGraph::DirectedWeightedEdge<int> edge2(2, node1, node3, -2);
CXXGraph::DirectedWeightedEdge<int> edge3(3, node3, node4, 2);
CXXGraph::DirectedWeightedEdge<int> edge4(4, node4, node2, -1);
CXXGraph::DirectedWeightedEdge<int> edge5(3, node2, node3, 3);

CXXGRAPH::T_EdgeSet<int> edgeSet;
CXXGraph::T_EdgeSet<int> edgeSet;
edgeSet.insert(&edge1);
edgeSet.insert(&edge2);
edgeSet.insert(&edge3);
edgeSet.insert(&edge4);
edgeSet.insert(&edge5);

CXXGRAPH::Graph<int> graph(edgeSet);
CXXGraph::Graph<int> graph(edgeSet);
for (auto _ : state) {
CXXGRAPH::FWResult res = graph.floydWarshall();
CXXGraph::FWResult res = graph.floydWarshall();
}
}
BENCHMARK(BM_FWDirected);

// a graph with negative cycle
static void BM_FWNegCycle(benchmark::State &state) {
CXXGRAPH::Node<int> node0("0", 0);
CXXGRAPH::Node<int> node1("1", 1);
CXXGRAPH::Node<int> node2("2", 2);
CXXGRAPH::DirectedWeightedEdge<int> edge1(1, node0, node1, 2);
CXXGRAPH::DirectedWeightedEdge<int> edge2(2, node1, node2, 3);
CXXGRAPH::DirectedWeightedEdge<int> edge3(3, node2, node0, -7);
CXXGRAPH::T_EdgeSet<int> edgeSet;
CXXGraph::Node<int> node0("0", 0);
CXXGraph::Node<int> node1("1", 1);
CXXGraph::Node<int> node2("2", 2);
CXXGraph::DirectedWeightedEdge<int> edge1(1, node0, node1, 2);
CXXGraph::DirectedWeightedEdge<int> edge2(2, node1, node2, 3);
CXXGraph::DirectedWeightedEdge<int> edge3(3, node2, node0, -7);
CXXGraph::T_EdgeSet<int> edgeSet;
edgeSet.insert(&edge1);
edgeSet.insert(&edge2);
edgeSet.insert(&edge3);
CXXGRAPH::Graph<int> graph(edgeSet);
CXXGraph::Graph<int> graph(edgeSet);
for (auto _ : state) {
CXXGRAPH::FWResult res = graph.floydWarshall();
CXXGraph::FWResult res = graph.floydWarshall();
}
}
BENCHMARK(BM_FWNegCycle);

static void BM_FWUndirectedWeighted(benchmark::State &state) {
CXXGRAPH::Node<int> node1("1", 1);
CXXGRAPH::Node<int> node2("2", 2);
CXXGRAPH::Node<int> node3("3", 3);
std::pair<const CXXGRAPH::Node<int> *, const CXXGRAPH::Node<int> *> pairNode(
CXXGraph::Node<int> node1("1", 1);
CXXGraph::Node<int> node2("2", 2);
CXXGraph::Node<int> node3("3", 3);
std::pair<const CXXGraph::Node<int> *, const CXXGraph::Node<int> *> pairNode(
&node1, &node2);
CXXGRAPH::DirectedWeightedEdge<int> edge1(1, pairNode, 1);
CXXGRAPH::DirectedWeightedEdge<int> edge2(2, node2, node3, 1);
CXXGRAPH::UndirectedWeightedEdge<int> edge3(3, node1, node3, 6);
CXXGRAPH::T_EdgeSet<int> edgeSet;
CXXGraph::DirectedWeightedEdge<int> edge1(1, pairNode, 1);
CXXGraph::DirectedWeightedEdge<int> edge2(2, node2, node3, 1);
CXXGraph::UndirectedWeightedEdge<int> edge3(3, node1, node3, 6);
CXXGraph::T_EdgeSet<int> edgeSet;
edgeSet.insert(&edge1);
edgeSet.insert(&edge2);
edgeSet.insert(&edge3);
CXXGRAPH::Graph<int> graph(edgeSet);
CXXGraph::Graph<int> graph(edgeSet);
for (auto _ : state) {
CXXGRAPH::FWResult res = graph.floydWarshall();
CXXGraph::FWResult res = graph.floydWarshall();
}
}
BENCHMARK(BM_FWUndirectedWeighted);

static void BM_FWNoWeighted(benchmark::State &state) {
CXXGRAPH::Node<int> node1("1", 1);
CXXGRAPH::Node<int> node2("2", 2);
CXXGRAPH::Node<int> node3("3", 3);
std::pair<const CXXGRAPH::Node<int> *, const CXXGRAPH::Node<int> *> pairNode(
CXXGraph::Node<int> node1("1", 1);
CXXGraph::Node<int> node2("2", 2);
CXXGraph::Node<int> node3("3", 3);
std::pair<const CXXGraph::Node<int> *, const CXXGraph::Node<int> *> pairNode(
&node1, &node2);
CXXGRAPH::DirectedWeightedEdge<int> edge1(1, pairNode, 1);
CXXGRAPH::DirectedWeightedEdge<int> edge2(2, node2, node3, 1);
CXXGRAPH::DirectedEdge<int> edge3(3, node1, node3);
CXXGRAPH::T_EdgeSet<int> edgeSet;
CXXGraph::DirectedWeightedEdge<int> edge1(1, pairNode, 1);
CXXGraph::DirectedWeightedEdge<int> edge2(2, node2, node3, 1);
CXXGraph::DirectedEdge<int> edge3(3, node1, node3);
CXXGraph::T_EdgeSet<int> edgeSet;
edgeSet.insert(&edge1);
edgeSet.insert(&edge2);
edgeSet.insert(&edge3);
CXXGRAPH::Graph<int> graph(edgeSet);
CXXGraph::Graph<int> graph(edgeSet);
for (auto _ : state) {
CXXGRAPH::FWResult res = graph.floydWarshall();
CXXGraph::FWResult res = graph.floydWarshall();
}
}

Expand Down
4 changes: 2 additions & 2 deletions benchmark/FordFulkerson_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void FordFulkerson_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
4 changes: 2 additions & 2 deletions benchmark/GraphSlicing_BM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Utilities.hpp"

static void GraphSlicing_X(benchmark::State &state) {
CXXGRAPH::Graph<int> g;
CXXGraph::Graph<int> g;
auto range_start = edges.begin();
auto range_end = edges.find(state.range(0));
std::unordered_map<unsigned long, CXXGRAPH::Edge<int> *> edgesX;
std::unordered_map<unsigned long, CXXGraph::Edge<int> *> edgesX;
edgesX.insert(range_start, range_end);
for (auto e : edgesX) {
g.addEdge(&(*e.second));
Expand Down
Loading

0 comments on commit cc2b0a7

Please sign in to comment.