org.apache.mahout.utils.vectors.io
Interface VectorWriter

All Superinterfaces:
Closeable
All Known Implementing Classes:
SequenceFileVectorWriter, TextualVectorWriter

public interface VectorWriter
extends Closeable


Method Summary
 long write(Iterable<Vector> iterable)
          Write all values in the Iterable to the output
 long write(Iterable<Vector> iterable, long maxDocs)
          Write the first maxDocs to the output.
 void write(Vector vector)
          Write out a vector
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

write

long write(Iterable<Vector> 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(Vector vector)
           throws IOException
Write out a vector

Parameters:
vector - The Vector to write
Throws:
IOException

write

long write(Iterable<Vector> 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.