Skip to main content

objectgraph-t--class

Represents a graph structure. Each node in graph - is an object of type T.

public class Korzh.EasyQuery.ObjectGraph<T>

Assembly: Korzh.EasyQuery.dll

Constructors

NameTypeDescription
ObjectGraph()void

Properties

NameTypeDescription
ParentDictionary<T, T>Gets the graph parent.
RootObjectGraph1.T`Gets or sets the root of the graph.
VerticesIEnumerable<T>Gets the list of all vertices.

Methods

NameTypeDescription
AddEdge(T vertexFrom, T vertexTo)voidAdds the edge (a connection between two nodes)
AddVertex(T vertex)voidAdds the vertex (node) into the graph.
BreadthFirstSearch(T vertex)IDictionary<T, T>Breadthes-first search in the graph for specified vertex.
Clear()voidClears the graph.
ContainsVertex(T vertex)boolDetermines whether this graph contains the specified vertex.
LCA(T vertex1, T vertex2, IEnumerable<T> usedVertices)ObjectGraph1.T`Calculates Lowest Common Ancestor for 2 vertices
RemoveVertex(T vertex)voidRemoves the vertex (node) from the graph.