Search Results for

    Show / Hide Table of Contents

    Class Edge

    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.

    Inheritance
    object
    GraphComponent
    Edge
    LineMergeEdge
    PolygonizeEdge
    Inherited Members
    GraphComponent.SetVisited(IEnumerator, bool)
    GraphComponent.SetMarked(IEnumerator, bool)
    GraphComponent.GetComponentWithVisitedState(IEnumerator, bool)
    GraphComponent.IsVisited
    GraphComponent.Visited
    GraphComponent.IsMarked
    GraphComponent.Marked
    GraphComponent.Data
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Planargraph
    Assembly: NetTopologySuite.dll
    Syntax
    public class Edge : GraphComponent

    Constructors

    | Edit this page View Source

    Edge()

    Constructs an Edge whose DirectedEdges are not yet set. Be sure to call SetDirectedEdges(DirectedEdge, DirectedEdge).

    Declaration
    public Edge()
    | Edit this page View Source

    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.

    Declaration
    public Edge(DirectedEdge de0, DirectedEdge de1)
    Parameters
    Type Name Description
    DirectedEdge de0
    DirectedEdge de1

    Fields

    | Edit this page View Source

    dirEdge

    The two DirectedEdges associated with this Edge.

    Declaration
    protected DirectedEdge[] dirEdge
    Field Value
    Type Description
    DirectedEdge[]

    Properties

    | Edit this page View Source

    IsRemoved

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

    Declaration
    public override bool IsRemoved { get; }
    Property Value
    Type Description
    bool
    Overrides
    GraphComponent.IsRemoved

    Methods

    | Edit this page View Source

    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.

    Declaration
    public DirectedEdge GetDirEdge(Node fromNode)
    Parameters
    Type Name Description
    Node fromNode
    Returns
    Type Description
    DirectedEdge
    | Edit this page View Source

    GetDirEdge(int)

    Returns one of the DirectedEdges associated with this Edge.

    Declaration
    public DirectedEdge GetDirEdge(int i)
    Parameters
    Type Name Description
    int i

    0 or 1.

    Returns
    Type Description
    DirectedEdge
    | Edit this page View Source

    GetOppositeNode(Node)

    If node is one of the two nodes associated with this Edge, returns the other node; otherwise returns null.

    Declaration
    public Node GetOppositeNode(Node node)
    Parameters
    Type Name Description
    Node node
    Returns
    Type Description
    Node
    | Edit this page View Source

    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.

    Declaration
    public void SetDirectedEdges(DirectedEdge de0, DirectedEdge de1)
    Parameters
    Type Name Description
    DirectedEdge de0
    DirectedEdge de1
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX