diff --git a/include/CXXGraph/Edge/Edge_decl.h b/include/CXXGraph/Edge/Edge_decl.h index bca27aac4..00f469903 100644 --- a/include/CXXGraph/Edge/Edge_decl.h +++ b/include/CXXGraph/Edge/Edge_decl.h @@ -59,7 +59,7 @@ class Edge { virtual ~Edge() = default; void setFirstNode(shared> node); void setSecondNode(shared> node); - const unsigned long long getId() const; + unsigned long long getId() const; const std::pair>, shared>> &getNodePair() const; shared> getOtherNode(shared> node) const; diff --git a/include/CXXGraph/Edge/Edge_impl.hpp b/include/CXXGraph/Edge/Edge_impl.hpp index 0c025a49e..529fc4611 100644 --- a/include/CXXGraph/Edge/Edge_impl.hpp +++ b/include/CXXGraph/Edge/Edge_impl.hpp @@ -79,7 +79,7 @@ void Edge::setSecondNode(shared> node) { } template -const unsigned long long Edge::getId() const { +unsigned long long Edge::getId() const { return id; } diff --git a/include/CXXGraph/Graph/Algorithm/CycleDetection_impl.hpp b/include/CXXGraph/Graph/Algorithm/CycleDetection_impl.hpp index 43d5313c7..ed043c99d 100644 --- a/include/CXXGraph/Graph/Algorithm/CycleDetection_impl.hpp +++ b/include/CXXGraph/Graph/Algorithm/CycleDetection_impl.hpp @@ -46,7 +46,6 @@ bool Graph::isCyclicDirectedGraphDFS() const { for (const auto &node : nodeSet) { state[node->getId()] = not_visited; } - int stateCounter = 0; // Start visiting each node. for (const auto &node : nodeSet) { diff --git a/include/CXXGraph/Partitioning/EdgeBalancedVertexCut.hpp b/include/CXXGraph/Partitioning/EdgeBalancedVertexCut.hpp index 593687650..c8aa7f22e 100644 --- a/include/CXXGraph/Partitioning/EdgeBalancedVertexCut.hpp +++ b/include/CXXGraph/Partitioning/EdgeBalancedVertexCut.hpp @@ -104,7 +104,6 @@ void EdgeBalancedVertexCut::performStep(shared> e, //*** Check which partition has the less load int MIN_LOAD = state->getMachineLoad(0); int machine_id = 0; - double MAX_SCORE = 0.0; for (int m = 0; m < P; m++) { int load = state->getMachineLoad(m); diff --git a/include/CXXGraph/Partitioning/Partition.hpp b/include/CXXGraph/Partitioning/Partition.hpp index 4c65a8c09..7c181e430 100644 --- a/include/CXXGraph/Partitioning/Partition.hpp +++ b/include/CXXGraph/Partitioning/Partition.hpp @@ -274,7 +274,6 @@ unsigned int getMinNodesLoad(const PartitionMap &partitionMap) { template unsigned int getNumberOfEdges(const PartitionMap &partitionMap) { - unsigned int numberOfEdges = 0; T_EdgeSet edgeSet; for (const auto &it : partitionMap) { @@ -289,7 +288,6 @@ unsigned int getNumberOfEdges(const PartitionMap &partitionMap) { template unsigned int getNumberOfNodes(const PartitionMap &partitionMap) { - unsigned int numberOfNodes = 0; std::unordered_set>, nodeHash> nodeSet; for (const auto &it : partitionMap) { @@ -358,8 +356,7 @@ std::ostream &operator<<(std::ostream &os, const Partition &partition) { os << *std::static_pointer_cast>(*it) << "\n"; } else { // Should never happens - os << "Wrong Edge Class" - << "\n"; + os << "Wrong Edge Class" << "\n"; } } return os; diff --git a/include/CXXGraph/Partitioning/WeightBalancedLibra.hpp b/include/CXXGraph/Partitioning/WeightBalancedLibra.hpp index 00698204b..32c997b2d 100644 --- a/include/CXXGraph/Partitioning/WeightBalancedLibra.hpp +++ b/include/CXXGraph/Partitioning/WeightBalancedLibra.hpp @@ -138,8 +138,6 @@ void WeightBalancedLibra::performStep(shared> e, // according to paper, s refers to node with lower degree, t = {u, v} - // {s} - size_t s_node = (u_degree > v_degree) ? v : u; - size_t t_node = (u_degree > v_degree) ? u : v; const std::set &s_partition = (u_degree > v_degree) ? v_partition : u_partition; const std::set &t_partition =