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,
Edge
s and Node
s) 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.
Assembly: NetTopologySuite.dll
Syntax
public abstract class PlanarGraph
Fields
|
Improve this Doc
View Source
dirEdges
Declaration
protected IList<DirectedEdge> dirEdges
Field Value
|
Improve this Doc
View Source
nodeMap
Declaration
protected NodeMap nodeMap
Field Value
Properties
|
Improve this Doc
View Source
Edges
Returns the Edges that have been added to this PlanarGraph.
Declaration
public IList<Edge> Edges { get; protected set; }
Property Value
|
Improve this Doc
View Source
Nodes
Returns the Nodes in this PlanarGraph.
Declaration
public ICollection<Node> Nodes { get; }
Property Value
Methods
|
Improve this Doc
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
|
Improve this Doc
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 |
|
|
Improve this Doc
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 |
|
|
Improve this Doc
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
Returns
Type |
Description |
Node |
The node found
or null if this graph contains no node at the location
|
|
Improve this Doc
View Source
FindNodesOfDegree(Int32)
Returns all Nodes with the given number of Edges around it.
Declaration
public IList<Node> FindNodesOfDegree(int degree)
Parameters
Type |
Name |
Description |
Int32 |
degree |
|
Returns
|
Improve this Doc
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
|
Improve this Doc
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
|
Improve this Doc
View Source
GetNodeEnumerator()
Returns an IEnumerator over the Nodes in this PlanarGraph.
Declaration
public IEnumerator<Node> GetNodeEnumerator()
Returns
|
Improve this Doc
View Source
Remove(DirectedEdge)
Declaration
public void Remove(DirectedEdge de)
Parameters
|
Improve this Doc
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 |
|
|
Improve this Doc
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 |
|