GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
spanningtree.c File Reference

Network Analysis library - spanning tree. 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 dependency graph for spanningtree.c:

Go to the source code of this file.

Functions

int NetA_spanning_tree (dglGraph_s *graph, struct ilist *tree_list)
 Get number of edges in the spanning forest. More...
 

Detailed Description

Network Analysis library - spanning tree.

Computes minimum spanning tree in the network.

(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.

Author
Daniel Bundala (Google Summer of Code 2009)

Definition in file spanningtree.c.

Function Documentation

◆ NetA_spanning_tree()

int NetA_spanning_tree ( dglGraph_s graph,
struct ilist tree_list 
)

Get number of edges in the spanning forest.

Parameters
graphinput graph
[out]listof edges
Returns
number of edges
-1 on failure

Definition at line 91 of file spanningtree.c.

References dglGet_EdgeCount(), dglGet_NodeCount(), and G_calloc.