|
| Graph_TS (const std::list< const Edge< T > * > &edgeSet) |
|
| Graph_TS (const Graph< T > &graph) |
|
const std::list< const Edge< T > * > & | getEdgeSet () const override |
| Function that return the Edge set of the Graph Note: Thread Safe. More...
|
|
void | setEdgeSet (std::list< const Edge< T > * > &edgeSet) override |
| Function set the Edge Set of the Graph Note: Thread Safe. More...
|
|
void | addEdge (const Edge< T > *edge) override |
| Function add an Edge to the Graph Edge Set Note: Thread Safe. More...
|
|
void | removeEdge (unsigned long long edgeId) override |
| Function remove an Edge from the Graph Edge Set Note: Thread Safe. More...
|
|
const std::list< const Node< T > * > | getNodeSet () const override |
| Function that return the Node Set of the Graph Note: Thread Safe. More...
|
|
const std::optional< const Edge< T > * > | getEdge (unsigned long long edgeId) const override |
| Function that return an Edge with specific ID if Exist in the Graph Note: Thread Safe. More...
|
|
const AdjacencyMatrix< T > | getAdjMatrix () const override |
| This function generate a list of adjacency matrix with every element of the matrix contain the node where is directed the link and the Edge corrispondent to the link Note: Thread Safe.
|
|
const DijkstraResult | dijkstra (const Node< T > &source, const Node< T > &target) const override |
| Function runs the dijkstra algorithm for some source node and target node in the graph and returns the shortest distance of target from the source. Note: Thread Safe. More...
|
|
const BellmanFordResult | bellmanford (const Node< T > &source, const Node< T > &target) const override |
| Function runs the bellmanford algorithm for some source node and target node in the graph and returns the shortest distance of target from the source if there is no negative cycle in the graph. Note: Thread Safe. More...
|
|
const FWResult | floydWarshall () const override |
| Function runs the floyd-Warshall algorithm for every node in the graph and returns the shortest distance of each node from another node if there is no negative cycle in the graph. Note: Thread Safe. More...
|
|
const std::vector< Node< T > > | breadth_first_search (const Node< T > &start) const override |
| Function performs the breadth first search algorithm over the graph Note: Thread Safe. More...
|
|
const std::vector< Node< T > > | depth_first_search (const Node< T > &start) const override |
| Function performs the depth first search algorithm over the graph Note: Thread Safe. More...
|
|
bool | isCyclicDirectedGraphDFS () const override |
| This function uses DFS to check for cycle in the graph. Pay Attention, this function work only with directed Graph Note: Thread Safe. More...
|
|
bool | isCyclicDirectedGraphBFS () const override |
| This function uses BFS to check for cycle in the graph. Pay Attention, this function work only with directed Graph Note: Thread Safe. More...
|
|
bool | isDirectedGraph () const override |
| This function checks if a graph is directed Note: Thread Safe. More...
|
|
const DialResult | dial (const Node< T > &source, int maxWeight) const override |
| This function write the graph in an output file Note: Thread Safe. More...
|
|
int | writeToFile (InputOutputFormat format=InputOutputFormat::STANDARD_CSV, const std::string &workingDir=".", const std::string &OFileName="graph", bool compress=false, bool writeNodeFeat=false, bool writeEdgeWeight=false) const override |
| This function write the graph in an output file Note: Thread Safe. More...
|
|
int | readFromFile (InputOutputFormat format=InputOutputFormat::STANDARD_CSV, const std::string &workingDir=".", const std::string &OFileName="graph", bool compress=false, bool readNodeFeat=false, bool readEdgeWeight=false) override |
| This function read the graph from an input file Note: Thread Safe. More...
|
|
PartitionMap< T > | partitionGraph (PARTITIONING::PartitionAlgorithm algorithm, unsigned int numberOfPartitions, double param1=0.0, double param2=0.0, double param3=0.0, unsigned int numberOfthreads=std::thread::hardware_concurrency()) const override |
| This function partition a graph in a set of partitions Note: Thread Safe. More...
|
|
| Graph (const std::list< const Edge< T > * > &edgeSet) |
|
virtual unsigned long long | setFind (std::unordered_map< unsigned long long, Subset > *, const unsigned long long elem) const |
| This function finds the subset of given a nodeId Subset is stored in a map where keys are the hash-id of the node & values is the subset. More...
|
|
virtual void | setUnion (std::unordered_map< unsigned long long, Subset > *, const unsigned long long set1, const unsigned long long elem2) const |
| This function modifies the original subset array such that it the union of two sets a and b. More...
|
|
virtual std::vector< Node< T > > | eulerianPath () const |
| This function finds the eulerian path of a directed graph using hierholzers algorithm. More...
|
|
virtual const MstResult | prim () const |
| Function runs the prim algorithm and returns the minimum spanning tree if the graph is undirected. Note: No Thread Safe. More...
|
|
virtual const MstResult | boruvka () const |
| Function runs the boruvka algorithm and returns the minimum spanning tree & cost if the graph is undirected. Note: No Thread Safe. More...
|
|
virtual const MstResult | kruskal () const |
| Function runs the kruskal algorithm and returns the minimum spanning tree if the graph is undirected. Note: No Thread Safe. More...
|
|
virtual bool | containsCycle (const std::list< const Edge< T > * > *) const |
| This function checks if the given set of edges forms a cycle or not using union-find method. More...
|
|
virtual bool | containsCycle (const std::list< const Edge< T > * > *edgeSet, std::unordered_map< unsigned long long, Subset > *) const |
| This function checks if the given Subset forms a cycle or not using union-find method. More...
|
|
virtual bool | isUndirectedGraph () const |
| This function checks if a graph is undirected Note: No Thread Safe. More...
|
|
virtual const std::vector< Node< T > > | graph_slicing (const Node< T > &start) const |
| This function performs Graph Slicing based on connectivity. More...
|
|
void | getLock () const |
|
void | releaseLock () const |
|
template<typename T>
class CXXGRAPH::Graph_TS< T >
Class that implement the Thread Safe Graph.