NETWORK Procedure
CONNECTEDCOMPONENTS Statement
The CONNECTEDCOMPONENTS statement invokes an algorithm that finds the connected components of the input graph. For more information about connected components, see the section Connected Components. You can specify the following options:
-
ALGORITHM=AUTOMATIC | AFFOREST | DFS | UNIONFIND
-
specifies the algorithm to use for calculating connected components. You can specify the following values:
- AUTOMATIC
uses the union-find or afforest algorithm for undirected graphs and the depth-first search algorithm for directed graphs.
- AFFOREST
uses the afforest algorithm for connected components. You can use this algorithm only with undirected graphs.
- DFS
uses the depth-first search algorithm for connected components.
- UNIONFIND
uses the union-find algorithm for connected components. You can use this algorithm only with undirected graphs.
By default, ALGORITHM=AUTOMATIC.
-
OUT=libref.data-table
specifies the output data table to contain the connected components summary results. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using SAS Viya Workbench in Chapter 1, Introduction.
Last updated: August 07, 2026