GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <stdio.h>
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/Vect.h>
#include <grass/glocale.h>
#include <grass/dgl/graph.h>
#include <grass/neta.h>
Go to the source code of this file.
Functions | |
void | NetA_degree_centrality (dglGraph_s *graph, double *degree) |
Computes degree centrality measure. More... | |
int | NetA_eigenvector_centrality (dglGraph_s *graph, int iterations, double error, double *eigenvector) |
Computes eigenvector centrality using edge costs as weights. More... | |
int | NetA_betweenness_closeness (dglGraph_s *graph, double *betweenness, double *closeness) |
Computes betweenness and closeness centrality measure using Brandes algorithm. More... | |
int NetA_betweenness_closeness | ( | dglGraph_s * | graph, |
double * | betweenness, | ||
double * | closeness | ||
) |
Computes betweenness and closeness centrality measure using Brandes algorithm.
Edge costs must be nonnegative. If some edge costs are negative then the behaviour of this method is undefined.
graph | input graph | |
[out] | betweenness | betweeness values |
[out] | closeness | cloneness values |
Definition at line 126 of file centrality.c.
References count, dglEdgeGet_Cost(), dglEdgeGet_Tail(), dglEdgeset_T_First(), dglEdgeset_T_Initialize(), dglEdgeset_T_Next(), dglEdgeset_T_Release(), dglGet_NodeCount(), dglGetNode(), dglHeapExtractMin(), dglHeapFree(), dglHeapInit(), dglHeapInsertMin(), dglNode_T_First(), dglNode_T_Initialize(), dglNode_T_Next(), dglNode_T_Release(), dglNodeGet_Id(), dglNodeGet_OutEdgeset(), G_fatal_error(), G_free(), G_percent(), G_percent_reset(), _dglHeapNode::key, NULL, dialogs::s, _dglHeapData::ul, _dglHeapNode::value, Vect_destroy_list(), Vect_list_append(), Vect_new_list(), Vect_reset_list(), and dialogs::w.
void NetA_degree_centrality | ( | dglGraph_s * | graph, |
double * | degree | ||
) |
Computes degree centrality measure.
Array degree has to be properly initialised to nnodes+1 elements
graph | input graph | |
[out] | array | of degrees |
Definition at line 32 of file centrality.c.
References dglGet_NodeCount(), dglGetNode(), and dglNodeGet_OutDegree().
int NetA_eigenvector_centrality | ( | dglGraph_s * | graph, |
int | iterations, | ||
double | error, | ||
double * | eigenvector | ||
) |
Computes eigenvector centrality using edge costs as weights.
graph | input graph | |
iterations | number of iterations | |
error | ? | |
[out] | eigenvector | eigen vector value |
Definition at line 54 of file centrality.c.
References dglEdgeGet_Cost(), dglEdgeGet_Tail(), dglEdgeset_T_First(), dglEdgeset_T_Initialize(), dglEdgeset_T_Next(), dglEdgeset_T_Release(), dglGet_NodeCount(), dglNode_T_First(), dglNode_T_Initialize(), dglNode_T_Next(), dglNode_T_Release(), dglNodeGet_Id(), dglNodeGet_OutEdgeset(), G_fatal_error(), and G_free().