IntArrayList clusterGroup = new IntArrayList();
while (!nodeQueue.isEmpty())
{
// Get a node from the queue
int node = nodeQueue.removeFirst();
// Add to the current sub-graph (cluster group)
clusterGroup.add(node);
// Add all its non-checked neighbors to the queue