Table of Contents

Class Node

Namespace
NetTopologySuite.Planargraph
Assembly
NetTopologySuite.dll

A node in a PlanarGraph is a location where 0 or more Edges meet. A node is connected to each of its incident Edges via an outgoing DirectedEdge. Some clients using a PlanarGraph may want to subclass Node to add their own application-specific data and methods.

public class Node : GraphComponent
Inheritance
Node
Inherited Members

Constructors

Node(Coordinate)

Constructs a Node with the given location.

public Node(Coordinate pt)

Parameters

pt Coordinate

Node(Coordinate, DirectedEdgeStar)

Constructs a Node with the given location and collection of outgoing DirectedEdges.

public Node(Coordinate pt, DirectedEdgeStar deStar)

Parameters

pt Coordinate
deStar DirectedEdgeStar

Fields

deStar

The collection of DirectedEdges that leave this Node.

protected DirectedEdgeStar deStar

Field Value

DirectedEdgeStar

pt

The location of this Node.

protected Coordinate pt

Field Value

Coordinate

Properties

Coordinate

Returns the location of this Node.

public Coordinate Coordinate { get; }

Property Value

Coordinate

Degree

Returns the number of edges around this Node.

public int Degree { get; }

Property Value

int

IsRemoved

Tests whether this component has been removed from its containing graph.

public override bool IsRemoved { get; }

Property Value

bool

OutEdges

Returns the collection of DirectedEdges that leave this Node.

public DirectedEdgeStar OutEdges { get; }

Property Value

DirectedEdgeStar

Methods

AddOutEdge(DirectedEdge)

Adds an outgoing DirectedEdge to this Node.

public void AddOutEdge(DirectedEdge de)

Parameters

de DirectedEdge

GetEdgesBetween(Node, Node)

Returns all Edges that connect the two nodes (which are assumed to be different).

public static IList<DirectedEdge> GetEdgesBetween(Node node0, Node node1)

Parameters

node0 Node
node1 Node

Returns

IList<DirectedEdge>

GetIndex(Edge)

Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis.

public int GetIndex(Edge edge)

Parameters

edge Edge

Returns

int

Remove(DirectedEdge)

Removes a DirectedEdge incident on this node. Does not change the state of the directed edge.

public void Remove(DirectedEdge de)

Parameters

de DirectedEdge

ToString()

public override string ToString()

Returns

string