1
0
Fork 0

Further attempt to fix Graph features

This commit is contained in:
Michael Hackstein 2015-05-28 23:47:33 -07:00
parent 849bf9d6cf
commit 117a81b4e2
2 changed files with 3 additions and 10 deletions

View File

@ -5855,18 +5855,11 @@ function CALCULATE_SHORTEST_PATHES_WITH_FLOYD_WARSHALL (graphData, options) {
return;
}
if (from === to) {
result.push({
startVertex : from,
vertex : graph.toVerticesIDs[to],
paths : options.noPaths ? null :[{edges : [], vertices : []}],
distance : 0
});
return;
}
result.push({
startVertex : from,
vertex : graph.toVerticesIDs[to],
paths : options.noPaths ? null : transformPath(paths[from][to].paths),
vertices: paths[from][to].paths[0].vertices,
edges: underscore.pluck(paths[from][to].paths[0].edges, "_id"),
distance : paths[from][to].distance
});
});

View File

@ -658,7 +658,7 @@ function ahuacatlQueryGeneralEdgesTestSuite() {
}
};
var actual = getRawQueryResults(AQL_NEIGHBORS, bindVars);
assertEqual(actual.length, 6);
assertEqual(actual.length, 4);
assertEqual(actual[0], v1 + "/v1");
assertEqual(actual[1], v1 + "/v2");
assertEqual(actual[2], v3 + "/v5");