|
From: <tho...@us...> - 2014-03-11 15:53:14
|
Revision: 7926
http://sourceforge.net/p/bigdata/code/7926
Author: thompsonbry
Date: 2014-03-11 15:53:10 +0000 (Tue, 11 Mar 2014)
Log Message:
-----------
Modified an SSSP test to verify that the code respect the link type constraint (there is a link that will be visited if the link type constraint is not respected).
Modified Paths:
--------------
branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/data/smallWeightedGraph.ttl
branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java
Modified: branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/data/smallWeightedGraph.ttl
===================================================================
--- branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/data/smallWeightedGraph.ttl 2014-03-11 13:25:05 UTC (rev 7925)
+++ branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/data/smallWeightedGraph.ttl 2014-03-11 15:53:10 UTC (rev 7926)
@@ -8,6 +8,23 @@
bd:1 foaf:knows bd:2 .
<<bd:1 foaf:knows bd:2 >> bd:weight "100"^^xsd:int .
+# Note: This uses a different link type. if the link type constraint is
+# not respected, then the hops and weighted distance between (1) and
+# (5) will be wrong (the hops will become 1 instead of 2, the weighted
+# distance will be 100-23=77 less than expected.)
+ bd:1 foaf:knows2 bd:5 .
+<<bd:1 foaf:knows2 bd:5 >> bd:weight "13"^^xsd:int .
+
+# This vertex property should be ignored by traversal if the test sets up
+# a constraint that only "links" are visited by the GAS traversal.
+ bd:1 rdf:label "blue" .
+
+# Note: This uses a different link attribute type for the weight. if the
+# link attribute type is used and not restricted to bd:weight2, then this
+# link will be "visible" and the weighted distance between (1) and (2) will
+# change.
+#<<bd:1 foaf:knows bd:2 >> bd:weight2 "7"^^xsd:int .
+
bd:1 foaf:knows bd:3 .
<<bd:1 foaf:knows bd:3 >> bd:weight "100"^^xsd:int .
Modified: branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java
===================================================================
--- branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java 2014-03-11 13:25:05 UTC (rev 7925)
+++ branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java 2014-03-11 15:53:10 UTC (rev 7926)
@@ -117,6 +117,7 @@
// Converge.
gasContext.call();
+ // check #of hops.
assertEquals(0, gasState.getState(p.getV1()).dist());
assertEquals(1, gasState.getState(p.getV2()).dist());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|