Connected Components
The Connected Components algorithm identifies the connected vertices in an undirected graph. The algorithm returns a unique connected component ID for each vertex in the graph.
Connected Components Syntax
Graph algorithms are accessed from an internal SPARQL service endpoint. To incorporate the Connected Components algorithm in a query, include a SERVICE statement in the WHERE clause. The service call specifies the name of the algorithm and defines the required and optional property values for that algorithm.
Use the following syntax in the SERVICE clause to find the connected components in a graph. The table below describes each property.
SERVICE <csi:connected_components> { [] <csi:binding-vertex> ?vertex_variable_name ; <csi:binding-id> ?component_id_variable_name ; <csi:edge-label> <edge_uri> ; [ <csi:graph> <graph_uri> ] . }