Click or drag to resize
GraphBaseTNode, TLink Class
Base graph class for the various incarnations in the graph analysis.
Inheritance Hierarchy
  Telerik.Windows.Diagrams.CoreGraphBaseTNode, TLink
    Telerik.Windows.Diagrams.CoreGraphTNodeData, TLinkData

Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core (in Telerik.Windows.Diagrams.Core.dll) Version: 2017.2.614.40 (2017.2.614.40)
public class GraphBase<TNode, TLink>
where TNode : class, new(), Object, INode<TNode, TLink>
where TLink : class, new(), Object, IEdge<TNode, TLink>

Type Parameters

The data type of the node which should be an implementation of the INode{TNode,TLink} interface and have a parameterless constructor.
The data type of the edge which should be an implementation of the IEdge{TNode,TLink} interface and have a parameterless constructor.

The GraphBaseTNode, TLink type exposes the following members.

Public methodGraphBaseTNode, TLink
Initializes a new instance of the GraphBaseTNode, TLink class.
Public methodGraphBaseTNode, TLink(GraphBaseTNode, TLink)
Initializes a new instance of the GraphBaseTNode, TLink class.
Public methodAddLink(TLink)
Adds the given link to the graph. It will add the sink and source nodes to the Nodes collection if they are not yet part of it.
Public methodAddLink(TNode, TNode)
Adds a link to this graph.
Public methodAddNode
Adds the given node to the graph.
Public methodAddNodes
Adds a series of nodes to the graph.
Public methodAreConnected(Int32, Int32, Boolean)
Returns whether the given nodes are connected in one direction or the other.
Public methodAreConnected(TNode, TNode, Boolean)
Returns whether the given nodes are connected in one direction or the other.
Public methodAreInSameComponent
Returns whether the two nodes with specified ide's are the in same component.
Public methodAssignIdentifiers
Assigns to each link and node an identifier based on their collection listIndex.
Public methodClone
Clones this instance.
Public methodDijkstraShortestPath
Returns the shortest path between two nodes using the Dijkstra algorithm.
Public methodEnsureUniqueIdentifiers
Ensures that the graph nodes all have a unique identifier assigned.
Public methodFindEdge
Finds the edge with the specified identifiers.
Public methodFindLongestPath
Finds the longest path in this (directed acyclic) graph.
Public methodFindNode
Finds the node with the specified identifier.
Public methodFindTreeRoot
Attempts to find a tree root by looking at the longest paths in the graph.
Public methodGetBoundingRectangleTNodeData, TLinkData
Returns the bounding rectangle of this layout graph.
Public methodGetConnectedComponents
Returns the connected components of this graph.
Public methodGetNextIdInNodes
Gets the next identifier of the nodes sequence.
Public methodHaveUniqueIdentifiers
Ensures the unique identifiers.
Public methodCode exampleNumberOfComponents
Returns the number of (connected) components.
Public methodNumberOfComponents(DictionaryInt32, Int32)
Returns the number of connected components.
Public methodRemoveAllLinksFrom
Detaches all links from from the given node and removes them from the graph structure.
Public methodRemoveLink
Removes the link from the graph.
Public methodRemoveNode
Removes the given node from this graph.
Public methodRenumberNodes
Assigns a new identifier to the nodes.
Public methodShortestPaths
Gets the shortest path lengths between each two vertices.
Public methodCode exampleToLinkListString
Returns a string representation of the incidence structure of this graph.
Public methodToLinksList
Returns the links structure of this graph as a list of identifier tuples.
Public methodTopologicalSort
Is a linear ordering of its vertices.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Public propertyIsAcyclic
Gets whether the graph is acyclic.
Public propertyIsConnected
Gets whether this graph is connected. See also this article;
Public propertyIsDirected
Gets whether this graph is directed.
Public propertyIsHamiltonian
Gets whether the graph is hamiltonian.
Public propertyLinks
Gets or sets the links of this graph.
Public propertyNodes
Gets or sets the nodes of this graph.
  • The graph is directed by default (
    IsDirected =
  • The adjacency structure is not centralized but resides in the Outgoing and Incoming collection attached to the Nodes.
See Also