Click or drag to resize

KeyIndexableGraphHelpersReIndexElementsT Method

For those graphs that do no support automatic reindexing of elements when a key is provided for indexing, this method can be used to simulate that behavior. The elements in the graph are iterated and their properties (for the provided keys) are removed and then added. Be sure that the key indices have been created prior to calling this method so that they can pick up the property mutations calls. Finally, if the graph is a TransactionalGraph, then a 1000 mutation buffer is used for each commit.

Namespace:  VelocityGraph.Frontenac.Blueprints.Util
Assembly:  VelocityGraph (in VelocityGraph.dll) Version: (11.1)
public static long ReIndexElements<T>(
	this IGraph graph,
	IEnumerable<T> elements,
	IEnumerable<string> keys
where T : IElement


Type: VelocityGraph.Frontenac.BlueprintsIGraph
the graph containing the provided elements
Type: System.Collections.GenericIEnumerableT
the elements to index into the key indices
Type: System.Collections.GenericIEnumerableString
the keys of the key indices

Type Parameters


[Missing <typeparam name="T"/> documentation for "M:VelocityGraph.Frontenac.Blueprints.Util.KeyIndexableGraphHelpers.ReIndexElements``1(VelocityGraph.Frontenac.Blueprints.IGraph,System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{System.String})"]

Return Value

Type: Int64
the number of element properties that were indexed

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IGraph. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also