Class Edge
- Namespace
- NetTopologySuite.Planargraph
- Assembly
- NetTopologySuite.dll
Represents an undirected edge of a {PlanarGraph}. An undirected edge
in fact simply acts as a central point of reference for two opposite
DirectedEdges.
Usually a client using a PlanarGraph will subclass Edge
to add its own application-specific data and methods.
public class Edge : GraphComponent- Inheritance
- 
      
      
      Edge
- Derived
- Inherited Members
Constructors
Edge()
Constructs an Edge whose DirectedEdges are not yet set. Be sure to call
SetDirectedEdges(DirectedEdge, DirectedEdge).
public Edge()Edge(DirectedEdge, DirectedEdge)
Constructs an Edge initialized with the given DirectedEdges, and for each DirectedEdge: sets the Edge, sets the symmetric DirectedEdge, and adds this Edge to its from-Node.
public Edge(DirectedEdge de0, DirectedEdge de1)Parameters
- de0DirectedEdge
- de1DirectedEdge
Fields
dirEdge
The two DirectedEdges associated with this Edge.
protected DirectedEdge[] dirEdgeField Value
Properties
IsRemoved
Tests whether this component has been removed from its containing graph.
public override bool IsRemoved { get; }Property Value
Methods
GetDirEdge(Node)
Returns the DirectedEdge that starts from the given node, or null if the node is not one of the two nodes associated with this Edge.
public DirectedEdge GetDirEdge(Node fromNode)Parameters
- fromNodeNode
Returns
GetDirEdge(int)
Returns one of the DirectedEdges associated with this Edge.
public DirectedEdge GetDirEdge(int i)Parameters
- iint
- 0 or 1. 
Returns
GetOppositeNode(Node)
If node is one of the two nodes associated with this Edge,
returns the other node; otherwise returns null.
public Node GetOppositeNode(Node node)Parameters
- nodeNode
Returns
SetDirectedEdges(DirectedEdge, DirectedEdge)
Initializes this Edge's two DirectedEdges, and for each DirectedEdge: sets the Edge, sets the symmetric DirectedEdge, and adds this Edge to its from-Node.
public void SetDirectedEdges(DirectedEdge de0, DirectedEdge de1)Parameters
- de0DirectedEdge
- de1DirectedEdge