Virtual template base class for graph objects. More...
#include <base_graph.hpp>
Public Member Functions | |
base_graph () | |
Constructor. | |
virtual | ~base_graph () |
Destructor. | |
std::string | get_type_of_graph () |
Returns the type of graph. | |
unsigned int | get_nb_vertices () |
Returns the number of vertices. | |
unsigned int | get_nb_edges () |
Returns the number of edges. | |
unsigned int | get_nb_zerodegree_vertices () |
Returns the number of vertices with no edge. | |
void | survey_degrees_distribution () |
Computes the quantities related to the degrees distribution. | |
VertexType * | operator() (unsigned int _id) |
Returns a VertexType object corresponding to the _id-th vertex. | |
virtual void | write_edgelist (std::string _name)=0 |
Exports the undirected graph to an edgelist. | |
virtual void | clear ()=0 |
Reinitializes the graph (specific variables). | |
Protected Member Functions | |
void | set_type_of_graph (std::string _type_of_graph) |
Sets the type of graph. | |
void | set_nb_vertices (unsigned int _value) |
Sets the number of vertices. | |
void | set_nb_edges (unsigned int _value) |
Sets the number of edges. | |
void | set_nb_of_types_of_degrees (unsigned int _value) |
Sets the number of types of degrees. | |
unsigned int | get_base_graph_min_degrees (unsigned int _type) |
Returns the minimal degree found in the graph. | |
unsigned int | get_base_graph_max_degrees (unsigned int _type) |
Returns the maximal degree found in the graph. | |
double | get_base_graph_avg_degrees (unsigned int _type) |
Returns the average degree found in the graph. | |
void | base_graph_clear () |
Reinitializes the graph (inherited variables). | |
Protected Attributes | |
bool | have_the_degree_distributions_been_surveyed |
Virtual template base class for graph objects.
This class provides the common members attributes and functions for all graph objects.