Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3 from chrisseaton/master

Move kmeans_seq into its own figure to fix issue #2
  • Loading branch information...
commit 1e49f3ccfd85623ea88499fdd3ea6306cdcd2033 2 parents d37818d + 309c517
@simonmar authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 doc/par.tex
View
10 doc/par.tex
@@ -920,10 +920,11 @@
implements step 3 of the algorithm, and finally @step@ combines
@assign@ and @makeNewClusters@ to implement one complete iteration.
-To complete the algorithm we need a driver to repeatedly apply the
-@step@ function until convergence. The function @kmeans_seq@, below,
-implements this:
+To complete the algorithm we need a driver to repeatedly apply the @step@
+function until convergence. The function @kmeans_seq@, in
+\figref{kmeans_seq}, implements this.
+\begin{figure}
\begin{haskell}
kmeans_seq :: Int -> [Vector] -> [Cluster] -> IO [Cluster]
kmeans_seq nclusters points clusters = do
@@ -940,6 +941,9 @@
--
loop 0 clusters
\end{haskell}
+\caption{Haskell code for kmeans\_seq}
+\label{fig:kmeans_seq}
+\end{figure}
How can this algorithm be parallelised? One place that looks
straightforward to parallelise is the @assign@ function, since it is
Please sign in to comment.
Something went wrong with that request. Please try again.