Search Results for

    Show / Hide Table of Contents

    Class PlanarGraph

    Represents a directed graph which is embeddable in a planar surface. This class and the other classes in this package serve as a framework for building planar graphs for specific algorithms. This class must be subclassed to expose appropriate methods to construct the graph. This allows controlling the types of graph components ({DirectedEdge}s, Edges and Nodes) which can be added to the graph. An application which uses the graph framework will almost always provide subclasses for one or more graph components, which hold application-specific data and graph algorithms.

    Inheritance
    object
    PlanarGraph
    LineMergeGraph
    PolygonizeGraph
    Inherited Members
    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 abstract class PlanarGraph

    Fields

    | Edit this page View Source

    dirEdges

    Declaration
    protected IList<DirectedEdge> dirEdges
    Field Value
    Type Description
    IList<DirectedEdge>
    | Edit this page View Source

    nodeMap

    Declaration
    protected NodeMap nodeMap
    Field Value
    Type Description
    NodeMap

    Properties

    | Edit this page View Source

    Edges

    Returns the Edges that have been added to this PlanarGraph.

    Declaration
    public IList<Edge> Edges { get; protected set; }
    Property Value
    Type Description
    IList<Edge>
    | Edit this page View Source

    Nodes

    Returns the Nodes in this PlanarGraph.

    Declaration
    public ICollection<Node> Nodes { get; }
    Property Value
    Type Description
    ICollection<Node>

    Methods

    | Edit this page View Source

    Add(DirectedEdge)

    Adds the Edge to this PlanarGraph; only subclasses can add DirectedEdges, to ensure the edges added are of the right class.

    Declaration
    protected void Add(DirectedEdge dirEdge)
    Parameters
    Type Name Description
    DirectedEdge dirEdge
    | Edit this page View Source

    Add(Edge)

    Adds the Edge and its DirectedEdges with this PlanarGraph. Assumes that the Edge has already been created with its associated DirectEdges. Only subclasses can add Edges, to ensure the edges added are of the right class.

    Declaration
    protected void Add(Edge edge)
    Parameters
    Type Name Description
    Edge edge
    | Edit this page View Source

    Add(Node)

    Adds a node to the map, replacing any that is already at that location. Only subclasses can add Nodes, to ensure Nodes are of the right type.

    Declaration
    protected void Add(Node node)
    Parameters
    Type Name Description
    Node node
    | Edit this page View Source

    FindNode(Coordinate)

    Returns the Node at the given pt, or null if no Node was there.

    Declaration
    public Node FindNode(Coordinate pt)
    Parameters
    Type Name Description
    Coordinate pt

    The location

    Returns
    Type Description
    Node

    The node found
    or null if this graph contains no node at the location

    | Edit this page View Source

    FindNodesOfDegree(int)

    Returns all Nodes with the given number of Edges around it.

    Declaration
    public IList<Node> FindNodesOfDegree(int degree)
    Parameters
    Type Name Description
    int degree
    Returns
    Type Description
    IList<Node>
    | Edit this page View Source

    GetDirEdgeEnumerator()

    Returns an Iterator over the DirectedEdges in this PlanarGraph, in the order in which they were added.

    Declaration
    public IEnumerator<DirectedEdge> GetDirEdgeEnumerator()
    Returns
    Type Description
    IEnumerator<DirectedEdge>
    | Edit this page View Source

    GetEdgeEnumerator()

    Returns an Iterator over the Edges in this PlanarGraph, in the order in which they were added.

    Declaration
    public IEnumerator<Edge> GetEdgeEnumerator()
    Returns
    Type Description
    IEnumerator<Edge>
    | Edit this page View Source

    GetNodeEnumerator()

    Returns an IEnumerator over the Nodes in this PlanarGraph.

    Declaration
    public IEnumerator<Node> GetNodeEnumerator()
    Returns
    Type Description
    IEnumerator<Node>
    | Edit this page View Source

    Remove(DirectedEdge)

    Removes a DirectedEdge from its from-Node and from this PlanarGraph.

    Declaration
    public void Remove(DirectedEdge de)
    Parameters
    Type Name Description
    DirectedEdge de
    Remarks

    This method does not remove the Nodes associated with the DirectedEdge, even if the removal of the DirectedEdge reduces the degree of a Node to zero.

    | Edit this page View Source

    Remove(Edge)

    Removes an Edge and its associated DirectedEdges from their from-Nodes and from this PlanarGraph. Note: This method does not remove the Nodes associated with the Edge, even if the removal of the Edge reduces the degree of a Node to zero.

    Declaration
    public void Remove(Edge edge)
    Parameters
    Type Name Description
    Edge edge
    | Edit this page View Source

    Remove(Node)

    Removes a node from the graph, along with any associated DirectedEdges and Edges.

    Declaration
    public void Remove(Node node)
    Parameters
    Type Name Description
    Node node
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX