## org.apache.mahout.utils.clustering
Interface ClusterWriter

All Superinterfaces:
  Closeable

All Known Implementing Classes:
  AbstractClusterWriter, ClusterDumperWriter, CSVClusterWriter, GraphMLClusterWriter, JsonClusterWriter

    public interface ClusterWriter

extends Closeable

Writes out clusters

Method Summary
`void` `write(ClusterWritable clusterWritable)` Write out a Cluster
`long` `write(Iterable<ClusterWritable> iterable)` Write all values in the Iterable to the output
`long` `write(Iterable<ClusterWritable> iterable, long maxDocs)` Write the first `maxDocs` to the output.

Methods inherited from interface java.io.Closeable
`close`

Method Detail

### write

    long write(Iterable<ClusterWritable> iterable)
               throws IOException

  Write all values in the Iterable to the output

  Parameters:
    `iterable` - The `Iterable` to loop over
  Returns:
    the number of docs written
  Throws:
    `IOException` - if there was a problem writing

### write

    void write(ClusterWritable clusterWritable)
               throws IOException

  Write out a Cluster

  Throws:
    `IOException`

### write

    long write(Iterable<ClusterWritable> iterable,
               long maxDocs)
               throws IOException

  Write the first `maxDocs` to the output.

  Parameters:
    `iterable` - The `Iterable` to loop over
    `maxDocs` - the maximum number of docs to write
  Returns:
    The number of docs written
  Throws:
    `IOException` - if there was a problem writing

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.