| CXXGraph 0.1.6 CXXGraph is a header only, that manages the Graphs and it's algorithm in C++

Public Member Functions | List of all members
CXXGRAPH::Partition< T > Class Template Reference
Inheritance diagram for CXXGRAPH::Partition< T >:
[legend]
Collaboration diagram for CXXGRAPH::Partition< T >:
[legend]

## Public Member Functions
| Partition (unsigned int partitionId)
| Partition (const std::list< const Edge< T > * > &edgeSet)
| Partition (unsigned int partitionId, const std::list< const Edge< T > * > &edgeSet)
unsigned int | getPartitionId () const
| Get the Partition ID. More...
void | setPartitionId (unsigned int partitionId)
| Set the Partition ID. More...
Public Member Functions inherited from CXXGRAPH::Graph< T >
| Graph (const std::list< const Edge< T > * > &edgeSet)
virtual const std::list< const Edge< T > * > & | getEdgeSet () const
| Function that return the Edge set of the Graph Note: No Thread Safe. More...
virtual void | setEdgeSet (std::list< const Edge< T > * > &edgeSet)
| Function set the Edge Set of the Graph Note: No Thread Safe. More...
virtual void | addEdge (const Edge< T > *edge)
| Function add an Edge to the Graph Edge Set Note: No Thread Safe. More...
virtual void | removeEdge (unsigned long edgeId)
| Function remove an Edge from the Graph Edge Set Note: No Thread Safe. More...
virtual const std::list< const Node< T > * > | getNodeSet () const
| Function that return the Node Set of the Graph Note: No Thread Safe. More...
virtual const std::optional< const Edge< T > * > | getEdge (unsigned long edgeId) const
| Function that return an Edge with specific ID if Exist in the Graph Note: No Thread Safe. More...
virtual const AdjacencyMatrix< T > | getAdjMatrix () const
| 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: No Thread Safe.
virtual const DijkstraResult | dijkstra (const Node< T > &source, const Node< T > &target) const
| 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: No Thread Safe. More...
virtual const std::vector< Node< T > > | breadth_first_search (const Node< T > &start) const
| Function performs the breadth first search algorithm over the graph Note: No Thread Safe. More...
virtual const std::vector< Node< T > > | depth_first_search (const Node< T > &start) const
| Function performs the depth first search algorithm over the graph Note: No Thread Safe. More...
virtual bool | isCyclicDirectedGraphDFS () const
| This function uses DFS to check for cycle in the graph. Pay Attention, this function work only with directed Graph Note: No Thread Safe. More...
virtual bool | isCyclicDirectedGraphBFS () const
| This function uses BFS to check for cycle in the graph. Pay Attention, this function work only with directed Graph Note: No Thread Safe. More...
virtual bool | isDirectedGraph () const
| This function checks if a graph is directed Note: No Thread Safe. More...
virtual const DialResult | dial (const Node< T > &source, int maxWeight) const
| This function write the graph in an output file Note: No Thread Safe. More...
virtual 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
| This function write the graph in an output file Note: No Thread Safe. More...
virtual 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)
| This function read the graph from an input file Note: No Thread Safe. More...
virtual PartitionMap< T > | partitionGraph (PartitionAlgorithm algorithm, unsigned int numberOfPartitions) const
| This function partition a graph in a set of partitions Note: No Thread Safe. More...

## Additional Inherited Members
Public Types inherited from CXXGRAPH::Graph< T >
enum | E_InputOutputFormat { STANDARD_CSV , STANDARD_TSV , OUT_1 , OUT_2 }
| Specify the Input/Output format of the Graph for Import/Export functions. More...
enum | E_PartitionAlgorithm { GREEDY_VC , ALG_1 , ALG_2 }
| Specify the Partition Algorithm. More...
typedef E_InputOutputFormat | InputOutputFormat
typedef E_PartitionAlgorithm | PartitionAlgorithm

## Member Function Documentation

## ◆ getPartitionId()

template<typename T >

unsigned int CXXGRAPH::Partition< T >::getPartitionId

Get the Partition ID.

Returns
  The ID of the partition

## ◆ setPartitionId()

template<typename T >

void CXXGRAPH::Partition< T >::setPartitionId | ( | unsigned int | partitionId | ) |

Set the Partition ID.

Parameters

  partitionId | the ID to set

The documentation for this class was generated from the following file:

- /github/workspace/include/Graph.hpp