CXXGraph  0.1.2
CXXGraph is a small library, header only, that manages the Graph 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 >:
Inheritance graph
[legend]
Collaboration diagram for CXXGRAPH::Partition< T >:
Collaboration graph
[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
 
void setPartitionId (unsigned int partitionId)
 
- Public Member Functions inherited from CXXGRAPH::Graph< T >
 Graph (const std::list< const Edge< T > * > &edgeSet)
 
const std::list< const Edge< T > * > & getEdgeSet () const
 
void setEdgeSet (std::list< const Edge< T > * > &edgeSet)
 
void addEdge (const Edge< T > *edge)
 
void removeEdge (unsigned long edgeId)
 
const std::list< const Node< T > * > getNodeSet () const
 
const std::optional< const Edge< T > * > getEdge (unsigned long edgeId) const
 
const AdjacencyMatrix< T > getAdjMatrix () const
 
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. More...
 
const std::vector< Node< T > > breadth_first_search (const Node< T > &start) const
 Function performs the breadth first search algorithm over the graph. More...
 
const std::vector< Node< T > > depth_first_search (const Node< T > &start) const
 Function performs the depth first search algorithm over the graph. More...
 
bool isCyclicDirectedGraphDFS () const
 This function uses DFS to check for cycle in the graph. Pay Attention, this function work only with directed Graph. More...
 
bool isCyclicDirectedGraphBFS () const
 This function uses BFS to check for cycle in the graph. Pay Attention, this function work only with directed Graph. More...
 
bool isDirectedGraph () const
 This function checks if a graph is directed. 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
 This function write the graph in an output file. 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)
 This function write the graph in an output file. More...
 
std::map< unsigned int, Partition< T > * > partitionGraph (PartitionAlgorithm algorithm, unsigned int numberOfPartitions) const
 This function partition a graph in a set of partitions. 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 }
 
typedef enum CXXGRAPH::Graph::E_InputOutputFormat InputOutputFormat
 Specify the Input/Output format of the Graph for Import/Export functions.
 
typedef enum CXXGRAPH::Graph::E_PartitionAlgorithm PartitionAlgorithm
 

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