Click or drag to resize

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.4.0.0 (1.4.19.0529)
Syntax
public TGraph GetSubGraph<TGraph>(
	Func<TVertex, bool> vertexSelector,
	Func<TEdge, bool> edgeSelector
)
where TGraph : new(), GraphBase<TVertex, TEdge>

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: TGraph
New graph instance with all vertices and edges from this graph which match the selector function specified
See Also