Graph C++ Library
 All Classes Namespaces Files Functions Variables Typedefs Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gcl::hms_directed_graph Class Reference

Class for random directed graphs embedded in a hidden metric space. More...

#include <hms_directed_graph.hpp>

Inheritance diagram for gcl::hms_directed_graph:
gcl::base_directed_graph< gcl::hms_directed_vertex > gcl::base_graph< gcl::hms_directed_vertex >

Public Member Functions

 hms_directed_graph ()
 Constructor.
 
 ~hms_directed_graph ()
 Destructor.
 
double get_nb_dimensions ()
 Returns the number of dimensions.
 
void set_metric_space_positions (unsigned int _nb_vertices, std::string _geometry, double _delta, std::mt19937 &_engine)
 Sets the metric space position.
 
void set_hidden_variables (std::vector< std::vector< double > > _sequence_hidden_variables)
 Sets the hidden variables of vertices.
 
void create_edges (std::string _prob_connection_type, std::vector< double > _prob_connection_param, std::mt19937 &_engine)
 Creates the edges of the graph.
 
void survey_hidden_variables ()
 Computes the quantities related to the degrees distribution.
 
void write_graph_properties (std::string _name)
 Exports the graph's properties.
 
void write_vertices_properties (std::string _name)
 Exports the vertices' properties.
 
void clear ()
 Reinitializes the graph.
 
unsigned int get_nb_reciprocal_edges ()
 Returns the number of reciprocal edges.
 
double get_reciprocity ()
 Returns the reciprocity.
 
unsigned int get_nb_undirected_projection_triangles ()
 Returns the number of triangles in the graph (regardless of the direction of the edges).
 
unsigned int get_nb_undirected_projection_wedges ()
 Returns the number of wegdes in the graph (regardless of the direction of the edges).
 
double get_global_undirected_projection_clustering_coefficient ()
 Returns the global clustering coefficient (3 x [number of triangles] / [number of wedges], regardless of the direction of the edges).
 
double get_avg_local_undirected_projection_clustering_coefficient ()
 Returns the average value of the local clustering coefficients.
 
unsigned int get_min_in_degree ()
 Returns the minimal in degree found in the graph.
 
unsigned int get_max_in_degree ()
 Returns the maximal in degree found in the graph.
 
double get_avg_in_degree ()
 Returns the average in degree found in the graph.
 
unsigned int get_min_out_degree ()
 Returns the minimal out degree found in the graph.
 
unsigned int get_max_out_degree ()
 Returns the maximal out degree found in the graph.
 
double get_avg_out_degree ()
 Returns the average out degree found in the graph.
 
void survey_triangles ()
 Creates a list of the triangles in the graph (regardless of the direction of the edges).
 
void write_edgelist (std::string _name)
 Exports the directed graph to an edgelist.
 
void compute_nb_reciprocal_edges ()
 Computes the number of reciprocal edges.
 
void compute_undirected_projection_clustering_coefficients ()
 Computes the clustering coefficients.
 
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.
 
gcl::hms_directed_vertexoperator() (unsigned int _id)
 Returns a VertexType object corresponding to the _id-th vertex.
 

Protected Member Functions

void base_directed_graph_clear ()
 Reinitializes the graph (inherited variables).
 
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

const unsigned int id_out_degree
 Index corresponding to the out-degree in degree-related vectors.
 
const unsigned int id_in_degree
 Index corresponding to the in-degree in degree-related vectors.
 
bool have_the_degree_distributions_been_surveyed
 

Detailed Description

Class for random directed graphs embedded in a hidden metric space.

This class provides the members attributes and functions for random directed graph objects that are embedded in a hidden metric space.

Author
Antoine Allard (antoineallard.info)
Date
Jan. 2016

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