Click or drag to resize

VertexTraverse Method (Int32, Boolean, Direction, Vertex, ISetEdgeType, ISetVertexType, ISetVertexType, ISetVertex, ISetVertex, ISetEdge, ISetEdge, ISetPropertyType, ISetPropertyType, ISetPropertyType, ISetPropertyType, FuncVertex, Boolean, FuncEdge, Boolean, FuncListEdge, Boolean)

Traverses graph from this Vertex to a target Vertex using Breadth-first search like in Dijkstra's algorithm

Namespace:  VelocityGraph
Assembly:  VelocityGraph (in VelocityGraph.dll) Version: 11.1.0.0 (11.1)
Syntax
public List<List<Edge>> Traverse(
	int maxHops,
	bool all = true,
	Direction dir = Direction.Both,
	Vertex toVertex = null,
	ISet<EdgeType> edgeTypesToTraverse = null,
	ISet<VertexType> includedVertexTypes = null,
	ISet<VertexType> excludedVertexTypes = null,
	ISet<Vertex> includedVertices = null,
	ISet<Vertex> excludedVertices = null,
	ISet<Edge> includedEdges = null,
	ISet<Edge> excludedEdges = null,
	ISet<PropertyType> includedVertexProperty = null,
	ISet<PropertyType> excludedVertexProperty = null,
	ISet<PropertyType> includedEdgeProperty = null,
	ISet<PropertyType> excludedEdgeProperty = null,
	Func<Vertex, bool> validateVertex = null,
	Func<Edge, bool> validateEdge = null,
	Func<List<Edge>, bool> validateEdges = null
)

Parameters

maxHops
Type: SystemInt32
maximum number of hops from this Vertex
all (Optional)
Type: SystemBoolean
find or not find all paths to goal Vertex
dir (Optional)
Type: VelocityGraph.Frontenac.BlueprintsDirection
Direction to traverse edges
toVertex (Optional)
Type: VelocityGraphVertex
the goal Vertex. If null, finds all paths
edgeTypesToTraverse (Optional)
Type: System.Collections.GenericISetEdgeType
the type of edges to follow, by default null which means follow all edge types
includedVertexTypes (Optional)
Type: System.Collections.GenericISetVertexType
the type of vertices's to follow, by default null which means follow all vertex types
excludedVertexTypes (Optional)
Type: System.Collections.GenericISetVertexType
the type of vertices's not to follow, by default null
includedVertices (Optional)
Type: System.Collections.GenericISetVertex
one or more Vertex instances that MUST be in the path for the path to be traversed i.e. if a path does exist to the specified toVertex, but does not include all the instances in includedVertices set, the Traverse method will exclude that path
excludedVertices (Optional)
Type: System.Collections.GenericISetVertex
one or more Vertex instances that MUST NOT be in the path for the path to be traversed i.e. if a path does exist to the specified toVertex, but does include any of the instances in includedVertices set, the Traverse method will exclude that path
includedEdges (Optional)
Type: System.Collections.GenericISetEdge
one or more Edge instances that MUST be in the path for the path to be traversed i.e. if a path does exist to the specified toVertex, but does not include all the instances in includedEdges set, the Traverse method will exclude that path
excludedEdges (Optional)
Type: System.Collections.GenericISetEdge
one or more Edge instances that MUST NOT be in the path for the path to be traversed i.e. if a path does exist to the specified toVertex, but does include any of the instances in includedEdges set, the Traverse method will exclude that path
includedVertexProperty (Optional)
Type: System.Collections.GenericISetPropertyType
One or more Vertex property types that MUST be in the path for the path to be accepted i.e. if a path does exist to the specified toVertex, but does not include all of the Vertex properties in the set, the Traverse method will exclude that path
excludedVertexProperty (Optional)
Type: System.Collections.GenericISetPropertyType
One or more Vertex property types that MUST NOT be in the path for the path to be accepted i.e. if a path does exist to the specified toVertex, but does include any of the Vertex properties in the set, the Traverse method will exclude that path
includedEdgeProperty (Optional)
Type: System.Collections.GenericISetPropertyType
One or more Vertex property types that MUST be in the path for the path to be accepted i.e. if a path does exist to the specified toVertex, but does not include all of the Vertex properties in the set, the Traverse method will exclude that path
excludedEdgeProperty (Optional)
Type: System.Collections.GenericISetPropertyType
One or more Edge property types that MUST NOT be in the path for the path to be accepted i.e. if a path does exist to the specified toVertex, but does include any of the Edge properties in the set, the Traverse method will exclude that path
validateVertex (Optional)
Type: SystemFuncVertex, Boolean
A function that will be called before accepting a Vertex in path to toVertex. If function returns true then this vertex is accepted in path; otherwise vertex is rejected
validateEdge (Optional)
Type: SystemFuncEdge, Boolean
A function that will be called before accepting an Edge in path to toVertex. If function returns true then this Edge is accepted in path; otherwise edge is rejected
validateEdges (Optional)
Type: SystemFuncListEdge, Boolean
A function that will be called before accepting a candidate Edges list in path to toVertex. If function returns true then this Edge list is accepted in path; otherwise edge list is rejected

Return Value

Type: ListListEdge
List of paths to goal Vertex
See Also