[GRASS-SVN] r45933 - in grass/branches/releasebranch_6_4: . include
include/Make lib/vector vector
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 13 07:11:59 EDT 2011
Author: martinl
Date: 2011-04-13 04:11:59 -0700 (Wed, 13 Apr 2011)
New Revision: 45933
Added:
grass/branches/releasebranch_6_4/include/neta.h
grass/branches/releasebranch_6_4/lib/vector/neta/
grass/branches/releasebranch_6_4/vector/v.net.allpairs/
grass/branches/releasebranch_6_4/vector/v.net.bridge/
grass/branches/releasebranch_6_4/vector/v.net.centrality/
grass/branches/releasebranch_6_4/vector/v.net.components/
grass/branches/releasebranch_6_4/vector/v.net.connectivity/
grass/branches/releasebranch_6_4/vector/v.net.distance/
grass/branches/releasebranch_6_4/vector/v.net.flow/
grass/branches/releasebranch_6_4/vector/v.net.spanningtree/
grass/branches/releasebranch_6_4/vector/v.net.timetable/
Modified:
grass/branches/releasebranch_6_4/Makefile
grass/branches/releasebranch_6_4/include/Make/Dir.make
grass/branches/releasebranch_6_4/include/Make/Grass.make.in
grass/branches/releasebranch_6_4/include/Make/Rules.make
grass/branches/releasebranch_6_4/include/Make/Shlib.make
grass/branches/releasebranch_6_4/lib/vector/Makefile
grass/branches/releasebranch_6_4/vector/Makefile
Log:
backport selected modules from devbr6:
* v.net.allpairs
* v.net.bridge
* v.net.centrality
* v.net.components
* v.net.connectivity
* v.net.distance
* v.net.flow
* v.net.spanningtree
* v.net.timetable
update Makefile system (devbr6) - only versioned libraries are produced
Modified: grass/branches/releasebranch_6_4/Makefile
===================================================================
--- grass/branches/releasebranch_6_4/Makefile 2011-04-13 11:09:49 UTC (rev 45932)
+++ grass/branches/releasebranch_6_4/Makefile 2011-04-13 11:11:59 UTC (rev 45933)
@@ -46,9 +46,12 @@
tools \
vector \
visualization \
- man \
- macosx
+ man
+ifneq ($(strip $(MACOSX_APP)),)
+ SUBDIRS += macosx
+endif
+
ifeq ($(strip $(MINGW)),)
SUBDIRS += gem
endif
@@ -59,7 +62,7 @@
LOCALE=0
endif
-FILES = AUTHORS COPYING CHANGES REQUIREMENTS.html contributors.csv contributors_extra.csv translators.csv GPL.TXT
+FILES = AUTHORS COPYING CHANGES REQUIREMENTS.html GPL.TXT contributors.csv contributors_extra.csv translators.csv
BIN_DIST_FILES = $(FILES) \
grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp \
@@ -96,6 +99,7 @@
-cp -f $(FILES) ${ARCH_DISTDIR}/
-cp -f ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} ${ARCH_DISTDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp
@test -d ${ARCH_DISTDIR}/tools/ || mkdir -p ${ARCH_DISTDIR}/tools/
+ -${INSTALL} tools/g.html2man/g.html2man ${ARCH_DISTDIR}/tools/ 2>/dev/null
-${INSTALL} tools/mkhtml.sh ${ARCH_DISTDIR}/tools/ 2>/dev/null
@(cd tools ; sh -c "./build_html_index.sh")
@if [ `cat "$(ERRORLOG)" | wc -l` -gt 5 ] ; then \
@@ -289,6 +293,9 @@
@ # default to be /usr/local
@##### -cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - include | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -sed -e "s#^\(GRASS_HOME.[^=]*\).*#\1= ${INST_DIR}#" -e "s#^\(RUN_GISBASE.[^=]*\).*#\1= ${INST_DIR}#" ${GISBASE}/include/Make/Platform.make > ${INST_DIR}/include/Make/Platform.make
+ -sed -e "s#^\(ARCH_DISTDIR.[^=]*\).*#\1= ${INST_DIR}#" -e "s#^\(ARCH_BINDIR.[^=]*\).*#\1= ${UNIX_BIN}#" ${GISBASE}/include/Make/Grass.make > ${INST_DIR}/include/Make/Grass.make
+ -sed -e 's#/tools/g.html2man/g.html2man#/tools/g.html2man#' ${GISBASE}/include/Make/Man.make > ${INST_DIR}/include/Make/Man.make
-cd ${GISBASE} ; tar cBf - lib | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/monitorcap > ${INST_DIR}/etc/monitorcap
-sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/fontcap > ${INST_DIR}/etc/fontcap
Modified: grass/branches/releasebranch_6_4/include/Make/Dir.make
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Dir.make 2011-04-13 11:09:49 UTC (rev 45932)
+++ grass/branches/releasebranch_6_4/include/Make/Dir.make 2011-04-13 11:11:59 UTC (rev 45933)
@@ -19,8 +19,15 @@
$(MAKE) -C $$subdir clean; \
done
-.PHONY: subdirs cleansubdirs parsubdirs $(SUBDIRS)
+installsubdirs:
+ @list='$(SUBDIRS)'; \
+ for subdir in $$list; do \
+ echo $$subdir ; \
+ $(MAKE) -C $$subdir install; \
+ done
+.PHONY: subdirs cleansubdirs installsubdirs parsubdirs $(SUBDIRS)
+
parsubdirs: $(SUBDIRS)
$(SUBDIRS):
Modified: grass/branches/releasebranch_6_4/include/Make/Grass.make.in
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Grass.make.in 2011-04-13 11:09:49 UTC (rev 45932)
+++ grass/branches/releasebranch_6_4/include/Make/Grass.make.in 2011-04-13 11:11:59 UTC (rev 45933)
@@ -91,101 +91,102 @@
##################### library names #####################################
-ARRAYSTATS_LIBNAME = grass_arraystats
-BITMAP_LIBNAME = grass_bitmap
-BTREE_LIBNAME = grass_btree
-CLUSTER_LIBNAME = grass_cluster
-COORCNV_LIBNAME = grass_coorcnv
-DATETIME_LIBNAME = grass_datetime
-DBDIALOG_LIBNAME = grass_dbdialog
-DISPLAY_LIBNAME = grass_display
-DLG_LIBNAME = grass_dlg
-DSPF_LIBNAME = grass_dspf
-DRIVER_LIBNAME = grass_driver
-PNGDRIVER_LIBNAME = grass_pngdriver
-PSDRIVER_LIBNAME = grass_psdriver
-CAIRODRIVER_LIBNAME = grass_cairodriver
-EDIT_LIBNAME = grass_edit
-G3D_LIBNAME = grass_g3d
-GIS_LIBNAME = grass_gis
-GMATH_LIBNAME = grass_gmath
-GPDE_LIBNAME = grass_gpde
-GPROJ_LIBNAME = grass_gproj
-IBTREE_LIBNAME = grass_ibtree
-ICON_LIBNAME = grass_icon
-IMAGERY_LIBNAME = grass_I
-IORTHO_LIBNAME = grass_Iortho
-IOSTREAM_LIBNAME = grass_iostream
-ISMAP_LIBNAME = grass_ismap
-LINKM_LIBNAME = grass_linkm
-LOCK_LIBNAME = grass_lock
-MANAGE_LIBNAME = grass_manage
-RASTER_LIBNAME = grass_raster
-ROWIO_LIBNAME = grass_rowio
-SEGMENT_LIBNAME = grass_segment
-STATS_LIBNAME = grass_stats
-VASK_LIBNAME = grass_vask
-XGD_LIBNAME = grass_Xgd
-XGI_LIBNAME = grass_Xgi
-XPM_LIBNAME = grass_Xpm
+ARRAYSTATS_LIBNAME = grass_arraystats.$(GRASS_VERSION_NUMBER)
+BITMAP_LIBNAME = grass_bitmap.$(GRASS_VERSION_NUMBER)
+BTREE_LIBNAME = grass_btree.$(GRASS_VERSION_NUMBER)
+CLUSTER_LIBNAME = grass_cluster.$(GRASS_VERSION_NUMBER)
+COORCNV_LIBNAME = grass_coorcnv.$(GRASS_VERSION_NUMBER)
+DATETIME_LIBNAME = grass_datetime.$(GRASS_VERSION_NUMBER)
+DBDIALOG_LIBNAME = grass_dbdialog.$(GRASS_VERSION_NUMBER)
+DISPLAY_LIBNAME = grass_display.$(GRASS_VERSION_NUMBER)
+DLG_LIBNAME = grass_dlg.$(GRASS_VERSION_NUMBER)
+DSPF_LIBNAME = grass_dspf.$(GRASS_VERSION_NUMBER)
+DRIVER_LIBNAME = grass_driver.$(GRASS_VERSION_NUMBER)
+PNGDRIVER_LIBNAME = grass_pngdriver.$(GRASS_VERSION_NUMBER)
+PSDRIVER_LIBNAME = grass_psdriver.$(GRASS_VERSION_NUMBER)
+CAIRODRIVER_LIBNAME = grass_cairodriver.$(GRASS_VERSION_NUMBER)
+EDIT_LIBNAME = grass_edit.$(GRASS_VERSION_NUMBER)
+G3D_LIBNAME = grass_g3d.$(GRASS_VERSION_NUMBER)
+GIS_LIBNAME = grass_gis.$(GRASS_VERSION_NUMBER)
+GMATH_LIBNAME = grass_gmath.$(GRASS_VERSION_NUMBER)
+GPDE_LIBNAME = grass_gpde.$(GRASS_VERSION_NUMBER)
+GPROJ_LIBNAME = grass_gproj.$(GRASS_VERSION_NUMBER)
+IBTREE_LIBNAME = grass_ibtree.$(GRASS_VERSION_NUMBER)
+ICON_LIBNAME = grass_icon.$(GRASS_VERSION_NUMBER)
+IMAGERY_LIBNAME = grass_I.$(GRASS_VERSION_NUMBER)
+IORTHO_LIBNAME = grass_Iortho.$(GRASS_VERSION_NUMBER)
+IOSTREAM_LIBNAME = grass_iostream.$(GRASS_VERSION_NUMBER)
+ISMAP_LIBNAME = grass_ismap.$(GRASS_VERSION_NUMBER)
+LINKM_LIBNAME = grass_linkm.$(GRASS_VERSION_NUMBER)
+LOCK_LIBNAME = grass_locky.$(GRASS_VERSION_NUMBER)
+MANAGE_LIBNAME = grass_manage.$(GRASS_VERSION_NUMBER)
+RASTER_LIBNAME = grass_raster.$(GRASS_VERSION_NUMBER)
+ROWIO_LIBNAME = grass_rowio.$(GRASS_VERSION_NUMBER)
+SEGMENT_LIBNAME = grass_segment.$(GRASS_VERSION_NUMBER)
+STATS_LIBNAME = grass_stats.$(GRASS_VERSION_NUMBER)
+VASK_LIBNAME = grass_vask.$(GRASS_VERSION_NUMBER)
+XGD_LIBNAME = grass_Xgd.$(GRASS_VERSION_NUMBER)
+XGI_LIBNAME = grass_Xgi.$(GRASS_VERSION_NUMBER)
+XPM_LIBNAME = grass_Xpm.$(GRASS_VERSION_NUMBER)
# Vector
-DIG_LIBNAME = grass_dig
-DIG2_LIBNAME = grass_dig2
-VECTR_LIBNAME = grass_vect
-TRANS_LIBNAME = grass_trans
+DIG_LIBNAME = grass_dig.$(GRASS_VERSION_NUMBER)
+DIG2_LIBNAME = grass_dig2.$(GRASS_VERSION_NUMBER)
+VECTR_LIBNAME = grass_vect.$(GRASS_VERSION_NUMBER)
+TRANS_LIBNAME = grass_trans.$(GRASS_VERSION_NUMBER)
-SHAPE_LIBNAME = grass_shape
-GRAPH_LIBNAME = grass_dgl
-RTREE_LIBNAME = grass_rtree
+SHAPE_LIBNAME = grass_shape.$(GRASS_VERSION_NUMBER)
+GRAPH_LIBNAME = grass_dgl.$(GRASS_VERSION_NUMBER)
+RTREE_LIBNAME = grass_rtree.$(GRASS_VERSION_NUMBER)
-VEDIT_LIBNAME = grass_vedit
+VEDIT_LIBNAME = grass_vedit.$(GRASS_VERSION_NUMBER)
+NETA_LIBNAME = grass_neta.$(GRASS_VERSION_NUMBER)
# Interpolation
-INTERPDATA_LIBNAME = grass_interpdata
-INTERPFL_LIBNAME = grass_interpfl
-QTREE_LIBNAME = grass_qtree
+INTERPDATA_LIBNAME = grass_interpdata.$(GRASS_VERSION_NUMBER)
+INTERPFL_LIBNAME = grass_interpfl.$(GRASS_VERSION_NUMBER)
+QTREE_LIBNAME = grass_qtree.$(GRASS_VERSION_NUMBER)
# NVIZ related
-OGSF_LIBNAME = grass_ogsf
-NVIZ_LIBNAME = grass_nviz
+OGSF_LIBNAME = grass_ogsf.$(GRASS_VERSION_NUMBER)
+NVIZ_LIBNAME = grass_nviz.$(GRASS_VERSION_NUMBER)
# triangulation libraries
-SOS_LIBNAME = grass_sos
-LIA_LIBNAME = grass_lia
-OPTRI_LIBNAME = grass_optri
-BASIC_LIBNAME = grass_basic
+SOS_LIBNAME = grass_sos.$(GRASS_VERSION_NUMBER)
+LIA_LIBNAME = grass_lia.$(GRASS_VERSION_NUMBER)
+OPTRI_LIBNAME = grass_optri.$(GRASS_VERSION_NUMBER)
+BASIC_LIBNAME = grass_basic.$(GRASS_VERSION_NUMBER)
-XDISPLAY_LIBNAME = grass_Xdisplay
+XDISPLAY_LIBNAME = grass_Xdisplay.$(GRASS_VERSION_NUMBER)
# DBMI
-DBMI_LIBNAME = grass_dbmi
-DBMIBASE_LIBNAME = grass_dbmibase
-DBMICLIENT_LIBNAME = grass_dbmiclient
-DBMIDRIVER_LIBNAME = grass_dbmidriver
-SQLP_LIBNAME = grass_sqlp
-DBSTUBS_LIBNAME = grass_dbstubs
+DBMI_LIBNAME = grass_dbmi.$(GRASS_VERSION_NUMBER)
+DBMIBASE_LIBNAME = grass_dbmibase.$(GRASS_VERSION_NUMBER)
+DBMICLIENT_LIBNAME = grass_dbmiclient.$(GRASS_VERSION_NUMBER)
+DBMIDRIVER_LIBNAME = grass_dbmidriver.$(GRASS_VERSION_NUMBER)
+SQLP_LIBNAME = grass_sqlp.$(GRASS_VERSION_NUMBER)
+DBSTUBS_LIBNAME = grass_dbstubs.$(GRASS_VERSION_NUMBER)
# database forms
-FORM_LIBNAME = grass_form
+FORM_LIBNAME = grass_form.$(GRASS_VERSION_NUMBER)
# Symbols (icons, patterns)
-SYMB_LIBNAME = grass_symb
+SYMB_LIBNAME = grass_symb.$(GRASS_VERSION_NUMBER)
# Normality
-CDHC_LIBNAME = grass_cdhc
+CDHC_LIBNAME = grass_cdhc.$(GRASS_VERSION_NUMBER)
# Lidar
-LIDAR_LIBNAME = grass_lidar
+LIDAR_LIBNAME = grass_lidar.$(GRASS_VERSION_NUMBER)
# Raster/SIMWE
-SIM_LIBNAME = grass_sim
+SIM_LIBNAME = grass_sim.$(GRASS_VERSION_NUMBER)
# Sites (legacy)
-SITES_LIBNAME = grass_sites
+SITES_LIBNAME = grass_sites.$(GRASS_VERSION_NUMBER)
# LRS
-LRS_LIBNAME = grass_lrs
+LRS_LIBNAME = grass_lrs.$(GRASS_VERSION_NUMBER)
##################### library switches ##################################
@@ -206,7 +207,7 @@
EDITLIB = -l$(EDIT_LIBNAME) $(GISLIB) $(VASKLIB)
G3DLIB = -l$(G3D_LIBNAME) $(GISLIB)
GISLIB = -l$(GIS_LIBNAME) $(DATETIMELIB) $(XDRLIB) $(SOCKLIB) $(INTLLIB)
-GMATHLIB = -l$(GMATH_LIBNAME) $(GISLIB)
+GMATHLIB = -l$(GMATH_LIBNAME) $(GISLIB)
GPDELIB = -l$(GPDE_LIBNAME) $(GISLIB) $(G3DLIB)
GPROJLIB = -l$(GPROJ_LIBNAME) $(GISLIB) $(PROJLIB) $(GDALLIBS)
IBTREELIB = -l$(IBTREE_LIBNAME)
@@ -244,6 +245,7 @@
GRAPHLIB = -l$(GRAPH_LIBNAME)
RTREELIB = -l$(RTREE_LIBNAME)
VEDITLIB = -l$(VEDIT_LIBNAME) $(GISLIB) $(VECTRLIB)
+NETALIB = -l$(NETA_LIBNAME) $(GISLIB) $(VECTRLIB) $(GRAPHLIB)
VECTLIB = $(VECTRLIB) $(DIG2LIB) $(GRAPHLIB) $(RTREELIB) $(LINKMLIB) $(DBMILIB) $(GDALLIBS) $(GEOSLIBS)
# Interpolation
@@ -341,6 +343,7 @@
GRAPHDEP = $(ARCH_LIBDIR)/$(LIB_PREFIX)$(GRAPH_LIBNAME)$(LIB_SUFFIX)
RTREEDEP = $(ARCH_LIBDIR)/$(LIB_PREFIX)$(RTREE_LIBNAME)$(LIB_SUFFIX)
VEDITDEP = $(ARCH_LIBDIR)/$(LIB_PREFIX)$(VEDIT_LIBNAME)$(LIB_SUFFIX)
+NETADEP = $(ARCH_LIBDIR)/$(LIB_PREFIX)$(NETA_LIBNAME)$(LIB_SUFFIX)
VECTDEP = $(VECTRDEP) $(DIG2DEP) $(GRAPHDEP) $(RTREEDEP) $(LINKMDEP) $(DBMIDEP)
# Interpolation
Modified: grass/branches/releasebranch_6_4/include/Make/Rules.make
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Rules.make 2011-04-13 11:09:49 UTC (rev 45932)
+++ grass/branches/releasebranch_6_4/include/Make/Rules.make 2011-04-13 11:11:59 UTC (rev 45933)
@@ -66,6 +66,14 @@
%.tab.h %.tab.c: %.y
$(YACC) -b$* -p$* $(YACCFLAGS) $<
+run_grass = \
+ GISRC=$(RUN_GISRC) \
+ GISBASE=$(RUN_GISBASE) \
+ PATH="$(GISBASE)/bin:$$PATH" \
+ PYTHONPATH="$(call mkpath,$(GISBASE)/etc/python,$$PYTHONPATH)" \
+ $(LD_LIBRARY_PATH_VAR)="$(BIN):$(ARCH_LIBDIR):$(BASE_LIBDIR):$($(LD_LIBRARY_PATH_VAR))" \
+ LC_ALL=C \
+ $(1)
# default clean rules
clean:
@@ -77,6 +85,14 @@
done ; \
fi
+# default install rules
+install:
+ -if [ "$(INSTALL_SUBDIRS)" != "" ] ; then \
+ for dir in $(INSTALL_SUBDIRS) ; do \
+ $(MAKE) -C $$dir install ; \
+ done ; \
+ fi
+
# HTML page rules:
include $(MODULE_TOPDIR)/include/Make/Html.make
Modified: grass/branches/releasebranch_6_4/include/Make/Shlib.make
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Shlib.make 2011-04-13 11:09:49 UTC (rev 45932)
+++ grass/branches/releasebranch_6_4/include/Make/Shlib.make 2011-04-13 11:11:59 UTC (rev 45933)
@@ -1,6 +1,6 @@
# common dependencies and rules for building shared libraries
-SHLIB = $(ARCH_LIBDIR)/$(SHLIB_PREFIX)$(SHLIB_NAME).$(GRASS_VERSION_NUMBER)$(SHLIB_SUFFIX)
+SHLIB = $(ARCH_LIBDIR)/$(SHLIB_PREFIX)$(SHLIB_NAME)$(SHLIB_SUFFIX)
# Object that calls _setfmode(_O_BINARY) which must be linked to each DLL on Windows
ifdef MINGW
@@ -15,8 +15,8 @@
LDFLAGS += $(SHLIB_LDFLAGS)
$(SHLIB): $(SHLIB_OBJS)
- $(SHLIB_LD) -o $@ $(LDFLAGS) $^ $(EXTRA_LIBS) $(DLLMAIN_OBJ) && \
- (cd $(ARCH_LIBDIR); ln -f -s $(notdir $@) $(patsubst %.$(GRASS_VERSION_NUMBER)$(SHLIB_SUFFIX),%$(SHLIB_SUFFIX),$@))
+ $(SHLIB_LD) -o $@ $(LDFLAGS) $^ $(EXTRA_LIBS) $(DLLMAIN_OBJ)
+ # && \(cd $(ARCH_LIBDIR); ln -f -s $(notdir $@) $(patsubst %.$(GRASS_VERSION_NUMBER)$(SHLIB_SUFFIX),%$(SHLIB_SUFFIX),$@))
shlib: $(SHLIB)
Copied: grass/branches/releasebranch_6_4/include/neta.h (from rev 45911, grass/branches/develbranch_6/include/neta.h)
===================================================================
--- grass/branches/releasebranch_6_4/include/neta.h (rev 0)
+++ grass/branches/releasebranch_6_4/include/neta.h 2011-04-13 11:11:59 UTC (rev 45933)
@@ -0,0 +1,114 @@
+
+/****************************************************************
+ *
+ * MODULE: netalib
+ *
+ * AUTHOR(S): Daniel Bundala (Google Summer of Code 2009)
+ *
+ * PURPOSE: NETwork Analysis Library
+ *
+ * COPYRIGHT: (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.
+ *
+ ****************************************************************/
+
+#ifndef _NETA_H_
+#define _NETA_H_
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <grass/gis.h>
+#include <grass/Vect.h>
+#include <grass/dbmi.h>
+#include <grass/glocale.h>
+#include <grass/dgl/graph.h>
+
+/*bridge.c */
+int NetA_compute_bridges(dglGraph_s * graph, struct ilist *bridge_list);
+int NetA_articulation_points(dglGraph_s * graph,
+ struct ilist *articulation_list);
+
+/*components.c */
+int NetA_weakly_connected_components(dglGraph_s * graph, int *component);
+int NetA_strongly_connected_components(dglGraph_s * graph, int *component);
+
+/*spanningtree.c */
+int NetA_spanning_tree(dglGraph_s * graph, struct ilist *tree_list);
+
+/*allpairs.c */
+int NetA_allpairs(dglGraph_s * graph, dglInt32_t ** dist);
+
+/*neta_flow.c */
+int NetA_flow(dglGraph_s * graph, struct ilist *source_list,
+ struct ilist *sink_list, int *flow);
+int NetA_min_cut(dglGraph_s * graph, struct ilist *source_list,
+ struct ilist *sink_list, int *flow, struct ilist *cut);
+int NetA_split_vertices(dglGraph_s * in, dglGraph_s * out, int *node_costs);
+
+/*utils.c */
+void NetA_add_point_on_node(struct Map_info *In, struct Map_info *Out, int node,
+ struct line_cats *Cats);
+void NetA_points_to_nodes(struct Map_info *In, struct ilist *point_list);
+int NetA_get_node_costs(struct Map_info *In, int layer, char *column,
+ int *node_costs);
+void NetA_varray_to_nodes(struct Map_info *map, struct varray * varray,
+ struct ilist *nodes, int *nodes_to_features);
+int NetA_initialise_varray(struct Map_info *In, int layer, int mask_type,
+ char *where, char *cat, struct varray ** varray);
+/*centrality.c */
+void NetA_degree_centrality(dglGraph_s * graph, double *degree);
+int NetA_eigenvector_centrality(dglGraph_s * graph, int iterations,
+ double error, double *eigenvector);
+int NetA_betweenness_closeness(dglGraph_s * graph, double *betweenness,
+ double *closeness);
+
+/*path.c */
+int NetA_distance_from_points(dglGraph_s * graph, struct ilist *from, int *dst,
+ dglInt32_t ** prev);
+int NetA_find_path(dglGraph_s * graph, int from, int to, int *edges,
+ struct ilist *list);
+
+/*timetables.c */
+
+/*Structure containing all information about a timetable.
+ * Everything in indexed from 0.
+ */
+typedef struct
+{
+ int routes; /*Number of different routes. Two routes are different even if they differ only in time. */
+ int *route_length; /*Length of each route, i.e., number of stops */
+ int **route_stops; /*list of stops on each route in order (time increases) */
+ int **route_times; /*stop arrival times on overy route. Stops are given in the same order as above */
+ int stops; /*number of stops */
+ int *stop_length; /*Number of routes stopping at each stop */
+ int **stop_routes; /*List of routes for each stop. Routes are in increasing order */
+ int **stop_times; /*arrival times of routes for each stop. Routes are given in the same order as above */
+ int *walk_length; /*number of stops with "walking connection" for each stop */
+ int **walk_stops; /*list of stops within walking distance for each stop */
+ int **walk_times; /*walking times between stops as given above */
+} neta_timetable;
+
+typedef struct
+{
+ int **dst;
+ int **prev_stop;
+ int **prev_route;
+ int **prev_conn;
+ int rows, routes;
+} neta_timetable_result;
+int NetA_init_timetable_from_db(struct Map_info *In, int route_layer,
+ int walk_layer, char *route_id, char *times,
+ char *to_stop, char *walk_length,
+ neta_timetable * timetable, int **route_ids,
+ int **stop_ids);
+int NetA_timetable_shortest_path(neta_timetable * timetable, int from_stop,
+ int to_stop, int start_time, int min_change,
+ int max_changes, int walking_change,
+ neta_timetable_result * result);
+int NetA_timetable_get_route_time(neta_timetable * timetable, int stop,
+ int route);
+void NetA_timetable_result_release(neta_timetable_result * result);
+#endif
Modified: grass/branches/releasebranch_6_4/lib/vector/Makefile
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/Makefile 2011-04-13 11:09:49 UTC (rev 45932)
+++ grass/branches/releasebranch_6_4/lib/vector/Makefile 2011-04-13 11:11:59 UTC (rev 45933)
@@ -5,7 +5,8 @@
diglib \
Vlib \
transform \
- vedit
+ vedit \
+ neta
#doxygen:
DOXNAME=vector
@@ -22,3 +23,5 @@
Vlib: rtree dglib diglib
vedit: Vlib
+
+neta: Vlib
Modified: grass/branches/releasebranch_6_4/vector/Makefile
===================================================================
--- grass/branches/releasebranch_6_4/vector/Makefile 2011-04-13 11:09:49 UTC (rev 45932)
+++ grass/branches/releasebranch_6_4/vector/Makefile 2011-04-13 11:11:59 UTC (rev 45933)
@@ -34,10 +34,19 @@
v.neighbors \
v.net \
v.net.alloc \
+ v.net.allpairs \
+ v.net.bridge \
+ v.net.centrality \
+ v.net.components \
+ v.net.connectivity \
+ v.net.distance \
+ v.net.flow \
v.net.iso \
v.net.path \
v.net.salesman \
+ v.net.spanningtree \
v.net.steiner \
+ v.net.timetable \
v.net.visibility \
v.normal \
v.out.ascii \
More information about the grass-commit
mailing list