Interface
INode<TNode, TLink>

Graph analysis node description.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Type Parameters:

TNode

The type of the node.

TLink

The type of the link.

Syntax:

cs-api-definition
public interface INode<TNode, TLink> where TNode : INode<TNode, TLink> where TLink : IEdge<TNode, TLink>

Properties

Gets all links bounds to this node.

Declaration

cs-api-definition
IList<TLink> AllLinks { get; }

Property Value

IList<TLink>

All links.

BoundingRectangle

Gets or sets the bounding rectangle.

Declaration

cs-api-definition
Rect BoundingRectangle { get; set; }

Property Value

Rect

The bounding rectangle.

Remarks

This defines the location as well as the size of the shape as a result of a layout process.

Children

Gets the children nodes attached to this node.

Declaration

cs-api-definition
IEnumerable<TNode> Children { get; }

Property Value

IEnumerable<TNode>

The children collection.

Remarks

  • A child is defined as the opposite node from an edge starting at this node.
  • If the graph is not directed this will return the same collection as the Children and the Neighbors property, i.e. all the nodes attached to the this node.

Degree

Returns the total number of links attached.

Declaration

cs-api-definition
int Degree { get; }

Property Value

int

Id

Gets or sets the (supposed unique) identifier.

Declaration

cs-api-definition
int Id { get; set; }

Property Value

int

The identifier of this node.

Incoming

Gets the incoming links, i.e. the links towards this node.

Declaration

cs-api-definition
IList<TLink> Incoming { get; }

Property Value

IList<TLink>

The incoming links.

IsDirected

Gets or sets a value indicating whether this node is part of directed graph.

Declaration

cs-api-definition
bool IsDirected { get; set; }

Property Value

bool

true if this instance is directed; otherwise, false.

IsRoot

Gets or sets whether this node is the root of a tree.

Declaration

cs-api-definition
bool IsRoot { get; set; }

Property Value

bool

true if this instance is root; otherwise, false.

Neighbors

Gets the nodes adjacent to this node, i.e. both the Parents and Children nodes.

Declaration

cs-api-definition
IEnumerable<TNode> Neighbors { get; }

Property Value

IEnumerable<TNode>

All the neighbors nodes of this node.

Outgoing

Gets the outgoing links, i.e. the links leaving this node.

Declaration

cs-api-definition
IList<TLink> Outgoing { get; }

Property Value

IList<TLink>

The outgoing.

Parents

Gets the parent nodes attached to this node.

Declaration

cs-api-definition
IEnumerable<TNode> Parents { get; }

Property Value

IEnumerable<TNode>

The parent collection.

Remarks

  • A parent is defined as the opposite node from an edge ending at this node.
  • If the graph is not directed this will return the same collection as the Children and the Neighbors property, i.e. all the nodes attached to the this node.

Methods

AddIncomingEdge(TLink)

Adds an incoming link.

Declaration

cs-api-definition
void AddIncomingEdge(TLink edge)

Parameters

edge

TLink

The link to add.

AddOutgoingEdge(TLink)

Adds an outgoing link.

Declaration

cs-api-definition
void AddOutgoingEdge(TLink edge)

Parameters

edge

TLink

The link to add.

Clone()

Returns a shallow copy of this node.

Declaration

cs-api-definition
TNode Clone()

Returns

TNode

RemoveIncomingEdge(TLink)

Removes an incoming edge.

Declaration

cs-api-definition
void RemoveIncomingEdge(TLink edge)

Parameters

edge

TLink

The edge to remove.

Removes a link from this node.

Declaration

cs-api-definition
void RemoveLink(TLink link)

Parameters

link

TLink

The link.

RemoveOutgoingEdge(TLink)

Removes the given outgoing edge.

Declaration

cs-api-definition
void RemoveOutgoingEdge(TLink edge)

Parameters

edge

TLink

The edge to remove.