Class SearchNode
The helper point that the grid of the findpaths' possible ways consists of.
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public abstract class SearchNode
Constructors
SearchNode(PointF)
Initializes a new instance of the SearchNode class.
Declaration
public SearchNode(PointF ptLocation)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptLocation | The point location. |
Properties
Location
Gets the location.
Declaration
public PointF Location { get; }
Property Value
Type | Description |
---|---|
System.Drawing.PointF | The location. |
Neighbours
Gets the neighbours.
Declaration
public ArrayList Neighbours { get; }
Property Value
Type | Description |
---|---|
System.Collections.ArrayList | The neighbours. |
Parent
Gets or sets the parent.
Declaration
public SearchNode Parent { get; set; }
Property Value
Type | Description |
---|---|
SearchNode | The parent. |
Processed
Gets or sets a value indicating whether this SearchNode is processed.
Declaration
public bool Processed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
CalcHeuristicCost(SearchNode)
Calculates the heuristic cost.
Declaration
protected abstract float CalcHeuristicCost(SearchNode nodeTo)
Parameters
Type | Name | Description |
---|---|---|
SearchNode | nodeTo | The node to. |
Returns
Type | Description |
---|---|
System.Single | The value. |
CalcMoveCost(SearchNode)
Calculates the move cost.
Declaration
protected abstract float CalcMoveCost(SearchNode nodeFrom)
Parameters
Type | Name | Description |
---|---|---|
SearchNode | nodeFrom | The node from. |
Returns
Type | Description |
---|---|
System.Single | The value. |
GetAllCosts()
Gets all costs.
Declaration
public int GetAllCosts()
Returns
Type | Description |
---|---|
System.Int32 | The value. |
Remarks
Always return 0.
GetGraphHeuristicCost(SearchNode, SearchNode)
Gets the graph heuristic cost.
Declaration
public static float GetGraphHeuristicCost(SearchNode from, SearchNode to)
Parameters
Type | Name | Description |
---|---|---|
SearchNode | from | From node. |
SearchNode | to | To node. |
Returns
Type | Description |
---|---|
System.Single | The value. |
GetGraphMoveCost(SearchNode, SearchNode)
Gets the graph move cost.
Declaration
public static float GetGraphMoveCost(SearchNode from, SearchNode to)
Parameters
Type | Name | Description |
---|---|---|
SearchNode | from | The source node. |
SearchNode | to | The target node. |
Returns
Type | Description |
---|---|
System.Single | The value. |
GetGridHeuristicCost(SearchNode, SearchNode)
Gets the grid heuristic cost.
Declaration
public static float GetGridHeuristicCost(SearchNode from, SearchNode to)
Parameters
Type | Name | Description |
---|---|---|
SearchNode | from | Node to calc heuristic from. |
SearchNode | to | Node to calc heuristic to. |
Returns
Type | Description |
---|---|
System.Single | Heuristic from from to to. |
GetGridMoveCost(SearchNode, SearchNode)
Gets the grid move cost.
Declaration
public static float GetGridMoveCost(SearchNode from, SearchNode to)
Parameters
Type | Name | Description |
---|---|---|
SearchNode | from | From node. |
SearchNode | to | To node. |
Returns
Type | Description |
---|---|
System.Single | The value. |
GetHeuristicCost(SearchNode)
Gets the heuristic cost.
Declaration
public float GetHeuristicCost(SearchNode node)
Parameters
Type | Name | Description |
---|---|---|
SearchNode | node | The node. |
Returns
Type | Description |
---|---|
System.Single | The value. |
GetMoveCost()
Calculates G value for this node from given node.
Declaration
public float GetMoveCost()
Returns
Type | Description |
---|---|
System.Single | G value. |
ResetFGCalculations()
Sets CalcFlag to true.
Declaration
public void ResetFGCalculations()