GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
Network Analysis library - graph components. More...
#include <stdio.h>
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/vector.h>
#include <grass/glocale.h>
#include <grass/dgl/graph.h>
Go to the source code of this file.
Functions | |
int | NetA_weakly_connected_components (dglGraph_s *graph, int *component) |
Computes weakly connected components. More... | |
int | NetA_strongly_connected_components (dglGraph_s *graph, int *component) |
Computes strongly connected components with Kosaraju's two-pass algorithm. More... | |
Network Analysis library - graph components.
Computes strongly and weakly connected components.
(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 components.c.
int NetA_strongly_connected_components | ( | dglGraph_s * | graph, |
int * | component | ||
) |
Computes strongly connected components with Kosaraju's two-pass algorithm.
graph | input graph | |
[out] | component | array of component ids |
Definition at line 159 of file components.c.
References _, dglGet_NodeAttrSize(), dglGet_NodeCount(), dglNode_T_First(), dglNode_T_Initialize(), dglNode_T_Next(), dglNodeGet_Id(), G_calloc, G_fatal_error(), G_warning(), order(), and _dglGraph::Version.
int NetA_weakly_connected_components | ( | dglGraph_s * | graph, |
int * | component | ||
) |
Computes weakly connected components.
graph | input graph | |
[out] | component | array of component ids |
Definition at line 52 of file components.c.
References _, dglGet_NodeAttrSize(), dglGet_NodeCount(), dglNode_T_First(), dglNode_T_Initialize(), dglNode_T_Next(), dglNodeGet_Id(), G_calloc, G_fatal_error(), G_warning(), and _dglGraph::Version.