ObjectGraph<T> class

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

public class Korzh.EasyQuery.ObjectGraph<T>

Package: Korzh.EasyQuery (targets: netstandard2.0)

Assembly: Korzh.EasyQuery.dll

Constructors

Name Type Description
ObjectGraph() void

Properties

| Name | Type | Description | | --- | --- | --- | | Parent | Dictionary<T, T> | Gets the graph parent. | | Root | ObjectGraph1.T| Gets or sets the root of the graph. | | Vertices |IEnumerable&lt;T`> | Gets the list of all vertices. |

Methods

| Name | Type | Description | | --- | --- | --- | | AddEdge(T vertexFrom, T vertexTo) | void | Adds the edge (a connection between two nodes) | | AddVertex(T vertex) | void | Adds the vertex (node) into the graph. | | BreadthFirstSearch(T vertex) | IDictionary<T, T> | Breadthes-first search in the graph for specified vertex. | | Clear() | void | Clears the graph. | | ContainsVertex(T vertex) | bool | Determines 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(Tvertex) |void` | Removes the vertex (node) from the graph. |