GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
Network Analysis library - centrality. More...
#include <stdio.h>
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/vector.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... | |
Network Analysis library - centrality.
Centrality measures
(C) 2009-2010 by Daniel Bundala, and the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file centrality.c.
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, dglGet_NodeCount(), dglNode_T_First(), dglNode_T_Initialize(), dglNode_T_Next(), dst, G_calloc, G_fatal_error(), G_percent(), G_percent_reset(), complex::i, and Vect_new_list().
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] | degree | array of degrees |
Definition at line 32 of file centrality.c.
References dglGet_NodeCount(), dglGetNode(), dglNodeGet_OutDegree(), and complex::i.
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 complex::i.