> For the complete documentation index, see [llms.txt](https://george-jen.gitbook.io/data-science-and-apache-spark/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://george-jen.gitbook.io/data-science-and-apache-spark/class-connectedcomponents.md).

# Class ConnectedComponents

```
Object
  org.apache.spark.graphx.lib.ConnectedComponents
```

Methods:

```
static <VD,ED> Graph<Object,ED>	run(Graph<VD,ED> graph, scala.reflect.ClassTag<VD> evidence$3, scala.reflect.ClassTag<ED> evidence$4)

Compute the connected component membership of each vertex and return a graph with the vertex value containing the lowest vertex id in the connected component containing that vertex.

static <VD,ED> Graph<Object,ED>	run(Graph<VD,ED> graph, int maxIterations, scala.reflect.ClassTag<VD> evidence$1, scala.reflect.ClassTag<ED> evidence$2)

Compute the connected component membership of each vertex and return a graph with the vertex value containing the lowest vertex id in the connected component containing that vertex.
```
