Skip to content

Commit

Permalink
Update namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nrkramer committed May 8, 2023
1 parent 04c6cb7 commit f63ca8e
Show file tree
Hide file tree
Showing 31 changed files with 96 additions and 96 deletions.
4 changes: 2 additions & 2 deletions include/Edge/DirectedEdge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "Edge.hpp"

namespace CXXGRAPH {
namespace CXXGraph {
template <typename T>
class UndirectedEdge;

Expand Down Expand Up @@ -97,6 +97,6 @@ std::ostream &operator<<(std::ostream &os, const DirectedEdge<T> &edge) {
<< edge.getId() << "|-----> ((Node: " << edge.getTo().getId() << "))";
return os;
}
} // namespace CXXGRAPH
} // namespace CXXGraph

#endif // __CXXGRAPH_DIRECTEDEDGE_H__
4 changes: 2 additions & 2 deletions include/Edge/DirectedWeightedEdge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "DirectedEdge.hpp"
#include "Weighted.hpp"

namespace CXXGRAPH {
namespace CXXGraph {
// Foward Declaration
template <typename T>
class UndirectedWeightedEdge;
Expand Down Expand Up @@ -113,6 +113,6 @@ std::ostream &operator<<(std::ostream &os,
return os;
}

} // namespace CXXGRAPH
} // namespace CXXGraph

#endif // __CXXGRAPH_DIRECTEDWEIGHTEDEDGE_H__
4 changes: 2 additions & 2 deletions include/Edge/Edge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "Node/Node.hpp"

namespace CXXGRAPH {
namespace CXXGraph {
template <typename T>
class Edge;
// ostream operator
Expand Down Expand Up @@ -110,6 +110,6 @@ std::ostream &operator<<(std::ostream &os, const Edge<T> &edge) {
<< "|-----? ((Node: " << edge.nodePair.second->getId() << "))";
return os;
}
} // namespace CXXGRAPH
} // namespace CXXGraph

#endif // __CXXGRAPH_EDGE_H__
4 changes: 2 additions & 2 deletions include/Edge/UndirectedEdge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "Edge.hpp"

namespace CXXGRAPH {
namespace CXXGraph {

template <typename T>
class UndirectedEdge;
Expand Down Expand Up @@ -97,6 +97,6 @@ std::ostream &operator<<(std::ostream &os, const UndirectedEdge<T> &edge) {
<< edge.getId() << "|-----> ((Node: " << edge.getNode2().getId() << "))";
return os;
}
} // namespace CXXGRAPH
} // namespace CXXGraph

#endif // __CXXGRAPH_UNDIRECTEDEDGE_H__
4 changes: 2 additions & 2 deletions include/Edge/UndirectedWeightedEdge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "UndirectedEdge.hpp"
#include "Weighted.hpp"

namespace CXXGRAPH {
namespace CXXGraph {
// Foward Declaration
template <typename T>
class DirectedWeightedEdge;
Expand Down Expand Up @@ -115,6 +115,6 @@ std::ostream &operator<<(std::ostream &os,
return os;
}

} // namespace CXXGRAPH
} // namespace CXXGraph

#endif // __CXXGRAPH_UNDIRECTEDWEIGHTEDEDGE_H__
4 changes: 2 additions & 2 deletions include/Edge/Weighted.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#pragma once

namespace CXXGRAPH {
namespace CXXGraph {
class Weighted {
private:
double weight = 0.0;
Expand All @@ -47,6 +47,6 @@ inline double Weighted::getWeight() const { return weight; }
// inline because the implementation of non-template function in header file
inline void Weighted::setWeight(const double weight) { this->weight = weight; }

} // namespace CXXGRAPH
} // namespace CXXGraph

#endif // __CXXGRAPH_WEIGHTED_H__
6 changes: 3 additions & 3 deletions include/Graph/Graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@
#include <zlib.h>
#endif

namespace CXXGRAPH {
namespace CXXGraph {
template <typename T>
using T_EdgeSet = std::unordered_set<const Edge<T> *>;

namespace PARTITIONING {
namespace Partitioning {
template <typename T>
class Partition;
}
Expand Down Expand Up @@ -2770,5 +2770,5 @@ std::ostream &operator<<(std::ostream &os, const AdjacencyMatrix<T> &adj) {
return os;
}

} // namespace CXXGRAPH
} // namespace CXXGraph
#endif // __CXXGRAPH_GRAPH_H__
4 changes: 2 additions & 2 deletions include/Node/Node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <iomanip>
#include <iostream>

namespace CXXGRAPH {
namespace CXXGraph {
template <typename T>
class Node;
template <typename T>
Expand Down Expand Up @@ -116,6 +116,6 @@ std::ostream &operator<<(std::ostream &os, const Node<T> &node) {
<< " Id:\t" << node.userId << "\n Data:\t" << node.data << "\n}";
return os;
}
} // namespace CXXGRAPH
} // namespace CXXGraph

#endif // __CXXGRAPH_NODE_H__
8 changes: 4 additions & 4 deletions include/Partitioning/CoordinatedPartitionState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include "Partitioning/Utility/Globals.hpp"
#include "Record.hpp"

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {
template <typename T>
class CoordinatedPartitionState : public PartitionState<T> {
private:
Expand Down Expand Up @@ -259,7 +259,7 @@ template <typename T>
const PartitionMap<T> &CoordinatedPartitionState<T>::getPartitionMap() const {
return partition_map;
}
} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_COORDINATEDPARTITIONSTATE_H__
8 changes: 4 additions & 4 deletions include/Partitioning/CoordinatedRecord.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include "Record.hpp"
#include "Utility/Typedef.hpp"

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {

template <typename T>
class CoordinatedRecord : public Record<T> {
Expand Down Expand Up @@ -139,7 +139,7 @@ template <typename T>
void CoordinatedRecord<T>::addAll(const std::set<int> &set) {
partitions.insert(set.begin(), set.end());
}
} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_COORDINATEDRECORD_H__
8 changes: 4 additions & 4 deletions include/Partitioning/EBV.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include "PartitionStrategy.hpp"
#include "Partitioning/Utility/Globals.hpp"

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {
/**
* @brief A Vertex Cut Partioning Algorithm ( as described by this paper
* https://arxiv.org/abs/2010.09007 )
Expand Down Expand Up @@ -160,7 +160,7 @@ void EBV<T>::performStep(const Edge<T> &e, PartitionState<T> &state){
v_record->releaseLock();
return;
}
} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_EBV_H__
8 changes: 4 additions & 4 deletions include/Partitioning/EdgeBalancedVertexCut.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include "PartitionStrategy.hpp"
#include "Partitioning/Utility/Globals.hpp"

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {
/**
* @brief A Vertex Cut Partioning Algorithm that assign an edge in the partition
* with less load
Expand Down Expand Up @@ -138,7 +138,7 @@ void EdgeBalancedVertexCut<T>::performStep(const Edge<T> &e,
v_record->releaseLock();
return;
}
} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_EDGEBALANCEDVERTEXCUT_H__
8 changes: 4 additions & 4 deletions include/Partitioning/GreedyVertexCut.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include "PartitionStrategy.hpp"
#include "Partitioning/Utility/Globals.hpp"

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {
/**
* @brief A Greedy Vertex Cut Partioning Algorithm
* @details This algorithm is a greedy algorithm that partitions the graph into
Expand Down Expand Up @@ -221,7 +221,7 @@ void GreedyVertexCut<T>::performStep(const Edge<T> &e,
v_record->releaseLock();
return;
}
} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_GREEDYVERTEXCUT_H__
8 changes: 4 additions & 4 deletions include/Partitioning/HDRF.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include "PartitionStrategy.hpp"
#include "Partitioning/Utility/Globals.hpp"

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {
/**
* @brief A Vertex Cut Partioning Algorithm ( as described by this paper
* https://www.fabiopetroni.com/Download/petroni2015HDRF.pdf )
Expand Down Expand Up @@ -193,7 +193,7 @@ void HDRF<T>::performStep(const Edge<T> &e, PartitionState<T> &state) {
v_record->releaseLock();
return;
}
} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_HDRF_H__
8 changes: 4 additions & 4 deletions include/Partitioning/Partition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
#include "PartitioningStats.hpp"
#include "Utility/Typedef.hpp"

namespace CXXGRAPH {
namespace CXXGraph {
template <typename T>
class Graph;

template <typename T>
using T_EdgeSet = std::unordered_set<const Edge<T> *>;
namespace PARTITIONING {
namespace Partitioning {
template <typename T>
std::ostream &operator<<(std::ostream &o, const Partition<T> &partition);

Expand Down Expand Up @@ -345,8 +345,8 @@ std::ostream &operator<<(std::ostream &os, const Partition<T> &partition) {
}
return os;
}
} // namespace PARTITIONING
} // namespace Partitioning

} // namespace CXXGRAPH
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITION_H__
8 changes: 4 additions & 4 deletions include/Partitioning/PartitionAlgorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#pragma once

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {
/// Specify the Partition Algorithm
enum E_PartitionAlgorithm {
EDGEBALANCED_VC_ALG, ///< A Edge Balanced Vertex-Cut Algorithm
Expand All @@ -35,7 +35,7 @@ enum E_PartitionAlgorithm {
WB_LIBRA, ///< Weighted Balanced Libra
};
typedef E_PartitionAlgorithm PartitionAlgorithm;
} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_PARTITIONALGORITHM_H__
8 changes: 4 additions & 4 deletions include/Partitioning/PartitionState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

#include "Record.hpp"

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {
template <typename T>
class PartitionState {
public:
Expand All @@ -45,7 +45,7 @@ class PartitionState {
virtual int getNumVertices() const = 0;
virtual std::set<int> getVertexIds() const = 0;
};
} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_PARTITIONSTATE_H__
8 changes: 4 additions & 4 deletions include/Partitioning/PartitionStrategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
#include "Edge/Edge.hpp"
#include "PartitionState.hpp"

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {
template <typename T>
class PartitionStrategy {
public:
virtual void performStep(const Edge<T> &t, PartitionState<T> &Sstate) = 0;
};
} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_PARTITIONSTRATEGY_H__
8 changes: 4 additions & 4 deletions include/Partitioning/Partitioner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
#include "Utility/Runnable.hpp"
#include "WeightBalancedLibra.hpp"

namespace CXXGRAPH {
namespace PARTITIONING {
namespace CXXGraph {
namespace Partitioning {
template <typename T>
class Partitioner {
private:
Expand Down Expand Up @@ -191,7 +191,7 @@ CoordinatedPartitionState<T> Partitioner<T>::performCoordinatedPartition() {
return startCoordinated();
}

} // namespace PARTITIONING
} // namespace CXXGRAPH
} // namespace Partitioning
} // namespace CXXGraph

#endif // __CXXGRAPH_PARTITIONING_PARTITIONER_H__
Loading

0 comments on commit f63ca8e

Please sign in to comment.