Add query function and state updater for clustering
Javadoc review
Add winnow variant