[GRASS-SVN] r56896 - grass/trunk/lib/vector/neta
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jun 23 13:03:38 PDT 2013
Author: mmetz
Date: 2013-06-23 13:03:38 -0700 (Sun, 23 Jun 2013)
New Revision: 56896
Modified:
grass/trunk/lib/vector/neta/path.c
Log:
netalib: revert r56890
Modified: grass/trunk/lib/vector/neta/path.c
===================================================================
--- grass/trunk/lib/vector/neta/path.c 2013-06-23 20:03:26 UTC (rev 56895)
+++ grass/trunk/lib/vector/neta/path.c 2013-06-23 20:03:38 UTC (rev 56896)
@@ -56,13 +56,13 @@
for (i = 0; i < from->n_values; i++) {
int v = from->value[i];
- if (dst[v] == -2)
+ if (dst[v] == 0)
continue; /*ingore duplicates */
- dst[v] = -2; /* make sure all from nodes are processed first */
+ dst[v] = 0; /* make sure all from nodes are processed first */
dglHeapData_u heap_data;
heap_data.ul = v;
- dglHeapInsertMin(&heap, -2, ' ', heap_data);
+ dglHeapInsertMin(&heap, 0, ' ', heap_data);
}
while (1) {
dglInt32_t v, dist;
@@ -82,18 +82,6 @@
dglNodeGet_OutEdgeset(graph,
dglGetNode(graph, v)));
- if (dglGet_NodeAttrSize(graph) > 0) {
- dglInt32_t ncost;
-
- memcpy(&ncost, dglNodeGet_Attr(graph, dglGetNode(graph, v)),
- sizeof(ncost));
- /* do not route paths through closed nodes */
- if (ncost < 0 && dist >= 0)
- continue;
-
- dist += ncost;
- }
-
for (edge = dglEdgeset_T_First(&et); edge;
edge = dglEdgeset_T_Next(&et)) {
dglInt32_t *to = dglEdgeGet_Tail(graph, edge);
@@ -162,16 +150,6 @@
break;
dglInt32_t *edge, *node = dglGetNode(graph, vertex);
-
- if (dglGet_NodeAttrSize(graph) > 0) {
- dglInt32_t ncost;
-
- memcpy(&ncost, dglNodeGet_Attr(graph, node), sizeof(ncost));
- /* do not route paths through closed nodes */
- if (ncost < 0 && vertex != from)
- continue;
- }
-
dglEdgeset_T_Initialize(&et, graph,
dglNodeGet_OutEdgeset(graph, node));
for (edge = dglEdgeset_T_First(&et); edge;
More information about the grass-commit
mailing list