Class SpatialNode
Inheritance
System.Object
SpatialNode
Assembly: Mars.Components.dll
Syntax
public class SpatialNode : AbstractGraphElement, IEquatable<AbstractGraphElement>, ISpatialNode, INode<ISpatialEdge, ISpatialNode>, IGraphEntity, IEqualityComparer<IGraphEntity>, IPositionable
Constructors
SpatialNode(Int32)
Creates a new
ISpatialNode with a given
as identifier and position (0,0) as source.
Declaration
public SpatialNode(int key)
Parameters
Type |
Name |
Description |
System.Int32 |
key |
The key used to identify |
SpatialNode(Int32, Position, IDictionary<String, Object>)
Declaration
public SpatialNode(int index, Position position, IDictionary<string, object> attributes)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
The key used to identify this object. |
Position |
position |
The coordinate where this node is located. |
IDictionary<System.String, System.Object> |
attributes |
The data dictionary. |
Properties
Directions
Declaration
public IDictionary<, DirectionType> Directions { get; set; }
Property Value
IncomingEdges
Gets the collection of all incoming edges,
targeting into this node.
Declaration
public IDictionary<int, ISpatialEdge> IncomingEdges { get; }
Property Value
IncomingModalities
Declaration
public ISet<SpatialModalityType> IncomingModalities { get; }
Property Value
NodeGuard
NodeGuard that controls the transition of agents between edges
Declaration
public INodeGuard NodeGuard { get; set; }
Property Value
OutgoingEdges
Set of all edges starting from the current edge
(directed graph)
Declaration
public IDictionary<int, ISpatialEdge> OutgoingEdges { get; }
Property Value
OutgoingModalities
Declaration
public ISet<SpatialModalityType> OutgoingModalities { get; }
Property Value
Position
Gets or sets the contained spatial position of an object.
Declaration
public Position Position { get; set; }
Property Value
Methods
AddIncomingEdge(ISpatialEdge)
Adds an edge to the incoming set of this node.
Declaration
public void AddIncomingEdge(ISpatialEdge edge)
Parameters
Type |
Name |
Description |
ISpatialEdge |
edge |
The edge to add with incoming direction. |
AddOutgoingEdge(ISpatialEdge)
Adds an edge to the outgoing set of this node.
Declaration
public void AddOutgoingEdge(ISpatialEdge edge)
Parameters
Type |
Name |
Description |
ISpatialEdge |
edge |
The edge to add with outgoing direction. |
GetDirection(ISpatialEdge, ISpatialEdge)
Declaration
public DirectionType GetDirection(ISpatialEdge incoming, ISpatialEdge outgoing)
Parameters
Returns
Merge(NodeData)
Declaration
public void Merge(NodeData nodeData)
Parameters
Implements
IEquatable<>
IEqualityComparer<>