[GRASSweb-list]markus: web/dglib README.html,NONE,1.1
grass at intevation.de
grass at intevation.de
Fri Jun 14 11:45:21 EDT 2002
Author: markus
Update of /grassrepository/web/dglib
In directory doto:/tmp/cvs-serv17459
Added Files:
README.html
Log Message:
added DGLIB - Directed Graph Library - from Roberto Micarelli
--- NEW FILE: README.html ---
<html><head><title>
LIBDGL -- a Directed Graph Library implementation
</title></head><body BGCOLOR=#FFFFFF>
<pre>
LIBDGL -- a Directed Graph Library implementation
Copyright (C) 2002 Roberto Micarelli
mi.ro at iol.it
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--------------------------------------------------------------------------
Dglib (Directed Graph Library) aims at giving support to network analysis.
Each graph is stored in a graph-context of type gnGrpGraph_s. At any given
point in time a graph can be in one of three states: EMPTY, TREE, FLAT. We
take a look of what these states mean:
1) EMPTY state
This is the state of a graph after initialization and before any
network data is put into it. In EMPTY state the only reasonable
thing to do with the graph is to add links (also called arcs) into
it. This is done by gnGrpAddLink(). After the first link has been
added the state of the graph changes to TREE.
2) TREE state
This is the state optimized to support graph modifications, since
all data is kept internally stored in binary search trees. The
operations that can be performed on a TREE graph are:
- gnGrpAddLink() - add links;
- gnGrpFlatten() - convert the graph to FLAT state;
- gnGrp{Set|Get}NodeAttr() - set/get extended attributes for a node;
- gnGrp{Set|Get}LinkAttr() - set/get extended attributes for a link;
- gnGrpGetNode() - return pointer to a node
- gnGrpGetLinkArea() - return pointer to a link-area
- gnGrpGetLink() - return pointer to a link
- gnGrpRelease() - release graph's resources.
3) FLAT state
In this state the graph is 'serializable', which is: it can be
written to a file or a stream. The binaru tree data representation
is transformed into arrays of 32 bit words with pointers stored as
offsets. Network analysis functions apply to FLAT state graphs.
When a FLAT graph is read from a file or stream it is ready for
analisys with no further initialization.
The operations that can be performed on a FLAT graph are:
- gnGrpUnflatten() - convert the graph back to TREE state;
- gnGrpWrite() - write the graph to a user supplied file descriptor;
- gnGrpRead() - read the graph from a user supplied file descriptor;
- gnGrp{Set|Get}NodeAttr() - set/get extended attributes for a node;
- gnGrp{Set|Get}LinkAttr() - set/get extended attributes for a link;
- gnGrpShortestPath() - perform a shortest path search;
- gnGrpGetNode() - return pointer to a node
- gnGrpGetLinkArea() - return pointer to a link-area
- gnGrpGetLink() - return pointer to a link
- gnGrpRelease() - discard the graph.
[...]
<a href=http://mpa.itc.it/radim/g51/d.path.jpg>Screenshot</a>
DGLib users:
- GRASS 5.1
<a href=http://grass.itc.it/grass51/>http://grass.itc.it/grass51/</a>
</pre>
</body>
</html>
More information about the grass-web
mailing list