\setcounter{AlgoLine}{0}
\DontPrintSemicolon
	\KwIn{Set $E$ of items in $\mathbb{R}^d$ with $l_2$ norm measuring the dissimilarity between items; $k$ centres $c_1, \dots, c_k \in\mathbb{R}^d$}
	\KwResult{Clusters $G_1, \dots, G_k \subset E$}
	
	\Repeat{no centre has moved\nllabel{kmeans_repetition}}
	{
		\ForAll{item $i \in E$} 
		{Assign each item $i \in E$ to its nearest centre, creating clusters $G_1, \dots, G_k \subset E$\nllabel{kmean_assignment}}
		
		\ForAll{$j \in 1, \dots, k$}
		{$c_j =$ gravity center of $G_j$\nllabel{kmean_reposition}}
	}

