Class
PathNode

Runtime data bucket for the A* algorithm.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public sealed class PathNode : IComparer<PathNode>, IPriorityObject

Inheritance: objectPathNode

Implements: IComparer<PathNode>IPriorityObject

Constructors

PathNode()

Initializes a new instance of the PathNode class.

Declaration

cs-api-definition
public PathNode()

PathNode(Point)

Initializes a new instance of the PathNode class.

Declaration

cs-api-definition
public PathNode(Point point)

Parameters

point

Point

Fields

Empty

Declaration

cs-api-definition
public static readonly PathNode Empty

Field Value

PathNode

Properties

F

Gets the current path length which is an estimate since the remains of the path to the target is a estimated to be a straight line.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "F")]
public double F { get; set; }

Property Value

double

G

Gets the actual lattice distance from the start to the current point in the search.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "G")]
public double G { get; set; }

Property Value

double

H

Gets the so-called heuristic distance which is usually the Euclidean distance to the endpoint or goal. The smaller the value the closer to the goal.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "H")]
public double H { get; set; }

Property Value

double

IsOpen

Gets or sets whether this node is part of the open set of not estimated nodes in the search.

Declaration

cs-api-definition
public bool IsOpen { get; set; }

Property Value

bool

True if this instance is open; otherwise, false.

IsWall

Gets or sets whether this node is accessible as part of the path searching.

Declaration

cs-api-definition
public bool IsWall { get; set; }

Property Value

bool

true if this instance is wall; otherwise, false.

Position

Gets or sets the position in the lattice.

Declaration

cs-api-definition
public Point Position { get; set; }

Property Value

Point

The position.

Priority

Gets or sets the priority.

Declaration

cs-api-definition
public int Priority { get; set; }

Property Value

int

The priority.

Implements IPriorityObject.Priority

Methods

Compare(PathNode, PathNode)

Compares the given nodes by comparing their estimated path length, i.e. the F values.

Declaration

cs-api-definition
public int Compare(PathNode x, PathNode y)

Parameters

x

PathNode

A node on the lattice.

y

PathNode

Another node on the lattice.

Returns

int

Implements IComparer<PathNode>.Compare(PathNode, PathNode)