1
0
Fork 0

added maxIterations param to GRAPH_EDGES and GRAPH_NEIGHBORS

This commit is contained in:
scottashton 2014-11-18 09:42:17 +01:00
parent 0be7a0c36d
commit 8f3779b1eb
2 changed files with 8 additions and 2 deletions

View File

@ -5825,7 +5825,9 @@ function AQL_NEIGHBORS (vertexCollection,
/// depth a path to a neighbor must have to be returned (default is 1). /// depth a path to a neighbor must have to be returned (default is 1).
/// * *maxDepth* : Defines the maximal /// * *maxDepth* : Defines the maximal
/// depth a path to a neighbor must have to be returned (default is 1). /// depth a path to a neighbor must have to be returned (default is 1).
/// /// * *maxIterations*: the maximum number of iterations that the traversal is
/// allowed to perform. It is sensible to set this number so unbounded traversals
/// will terminate at some point.
/// @EXAMPLES /// @EXAMPLES
/// ///
/// A route planner example, all neighbors of locations with a distance of either /// A route planner example, all neighbors of locations with a distance of either
@ -5875,6 +5877,7 @@ function AQL_GRAPH_NEIGHBORS (graphName,
factory = TRAVERSAL.generalGraphDatasourceFactory(graphName); factory = TRAVERSAL.generalGraphDatasourceFactory(graphName);
params.minDepth = options.minDepth === undefined ? 1 : options.minDepth; params.minDepth = options.minDepth === undefined ? 1 : options.minDepth;
params.maxDepth = options.maxDepth === undefined ? 1 : options.maxDepth; params.maxDepth = options.maxDepth === undefined ? 1 : options.maxDepth;
params.maxIterations = options.maxIterations;
params.paths = true; params.paths = true;
params.visitor = TRAVERSAL_NEIGHBOR_VISITOR; params.visitor = TRAVERSAL_NEIGHBOR_VISITOR;
var fromVertices = RESOLVE_GRAPH_TO_FROM_VERTICES(graphName, options); var fromVertices = RESOLVE_GRAPH_TO_FROM_VERTICES(graphName, options);
@ -5946,6 +5949,8 @@ function AQL_GRAPH_NEIGHBORS (graphName,
/// * *maxDepth* : Defines the maximal length of a path from an edge /// * *maxDepth* : Defines the maximal length of a path from an edge
/// to a vertex (default is 1, which means only the edges directly connected to a vertex would /// to a vertex (default is 1, which means only the edges directly connected to a vertex would
/// be returned). /// be returned).
/// * *maxIterations*: the maximum number of iterations that the traversal is
/// allowed to perform. It is sensible to set this number so unbounded traversals
/// ///
/// @EXAMPLES /// @EXAMPLES
/// ///

View File

@ -439,7 +439,8 @@ function ahuacatlQueryGeneralEdgesTestSuite() {
name: gN, name: gN,
example: v1 + "/v1", example: v1 + "/v1",
options: { options: {
direction : 'any' direction : 'any',
maxIterations : 10000
} }
}; };
var actual = getRawQueryResults(AQL_NEIGHBORS, bindVars); var actual = getRawQueryResults(AQL_NEIGHBORS, bindVars);