Class Subgraph
- Namespace
- NetTopologySuite.Planargraph
- Assembly
- NetTopologySuite.dll
A subgraph of a PlanarGraph. A subgraph may contain any subset of Edges from the parent graph. It will also automatically contain all DirectedEdges and Nodes associated with those edges. No new objects are created when edges are added - all associated components must already exist in the parent graph.
public class Subgraph
- Inheritance
-
Subgraph
- Inherited Members
Constructors
Subgraph(PlanarGraph)
Creates a new subgraph of the given PlanarGraph.
public Subgraph(PlanarGraph parentGraph)
Parameters
parentGraph
PlanarGraph
Fields
dirEdges
protected IList<DirectedEdge> dirEdges
Field Value
edges
protected HashSet<Edge> edges
Field Value
nodeMap
protected NodeMap nodeMap
Field Value
parentGraph
protected PlanarGraph parentGraph
Field Value
Methods
Add(Edge)
Adds an Edge to the subgraph. The associated DirectedEdges and Nodes are also added.
public void Add(Edge e)
Parameters
Contains(Edge)
Tests whether an Edge is contained in this subgraph.
public bool Contains(Edge e)
Parameters
Returns
GetDirEdgeEnumerator()
Returns an IEnumerator<T> over the DirectedEdges in this graph, in the order in which they were added.
public IEnumerator<DirectedEdge> GetDirEdgeEnumerator()
Returns
GetEdgeEnumerator()
Returns an IEnumerator<T> over the Edges in this graph, in the order in which they were added.
public IEnumerator<Edge> GetEdgeEnumerator()
Returns
GetNodeEnumerator()
Returns an IEnumerator<T> over the Nodes in this graph.
public IEnumerator<Node> GetNodeEnumerator()
Returns
GetParent()
Gets the PlanarGraph which this subgraph is part of.
public PlanarGraph GetParent()