mirror of https://gitee.com/bigwinds/arangodb
Further attempt to fix Graph features
This commit is contained in:
parent
849bf9d6cf
commit
117a81b4e2
|
@ -5855,18 +5855,11 @@ function CALCULATE_SHORTEST_PATHES_WITH_FLOYD_WARSHALL (graphData, options) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (from === to) {
|
if (from === to) {
|
||||||
result.push({
|
|
||||||
startVertex : from,
|
|
||||||
vertex : graph.toVerticesIDs[to],
|
|
||||||
paths : options.noPaths ? null :[{edges : [], vertices : []}],
|
|
||||||
distance : 0
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
result.push({
|
result.push({
|
||||||
startVertex : from,
|
vertices: paths[from][to].paths[0].vertices,
|
||||||
vertex : graph.toVerticesIDs[to],
|
edges: underscore.pluck(paths[from][to].paths[0].edges, "_id"),
|
||||||
paths : options.noPaths ? null : transformPath(paths[from][to].paths),
|
|
||||||
distance : paths[from][to].distance
|
distance : paths[from][to].distance
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -658,7 +658,7 @@ function ahuacatlQueryGeneralEdgesTestSuite() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var actual = getRawQueryResults(AQL_NEIGHBORS, bindVars);
|
var actual = getRawQueryResults(AQL_NEIGHBORS, bindVars);
|
||||||
assertEqual(actual.length, 6);
|
assertEqual(actual.length, 4);
|
||||||
assertEqual(actual[0], v1 + "/v1");
|
assertEqual(actual[0], v1 + "/v1");
|
||||||
assertEqual(actual[1], v1 + "/v2");
|
assertEqual(actual[1], v1 + "/v2");
|
||||||
assertEqual(actual[2], v3 + "/v5");
|
assertEqual(actual[2], v3 + "/v5");
|
||||||
|
|
Loading…
Reference in New Issue