GraphBaseTVertex, TEdgeGetSubGraphTGraph Method |
Gets a subgraph from this graph with the vertices and edges which match the functions specified. It creates a new instance and
places the same vertex and edge instances in that graph.
Namespace:
SD.Tools.Algorithmia.Graphs
Assembly:
SD.Tools.Algorithmia (in SD.Tools.Algorithmia.dll) Version: 1.2.0.0 (1.2.16.0406)
Syntax public TGraph GetSubGraph<TGraph>(
Func<TVertex, bool> vertexSelector,
Func<TEdge, bool> edgeSelector
)
where TGraph : new(), GraphBase<TVertex, TEdge>
Public Function GetSubGraph(Of TGraph As {New, GraphBase(Of TVertex, TEdge)}) (
vertexSelector As Func(Of TVertex, Boolean),
edgeSelector As Func(Of TEdge, Boolean)
) As TGraph
Parameters
- vertexSelector
- Type: SystemFuncTVertex, Boolean
The vertex selector. Can be null, which will result in all vertices being added - edgeSelector
- Type: SystemFuncTEdge, Boolean
The edge selector. Can be null, which will result in all edges being added
Type Parameters
- TGraph
- The type of the graph.
Return Value
Type:
TGraphNew graph instance with all vertices and edges from this graph which match the selector function specified
See Also