|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.utils.vectors.io.TextualVectorWriter
public class TextualVectorWriter
Write out the vectors to any Writer using Vector.asFormatString(),
one per line by default.
| Constructor Summary | |
|---|---|
TextualVectorWriter(Writer writer)
|
|
| Method Summary | |
|---|---|
void |
close()
|
protected Writer |
getWriter()
|
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 class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextualVectorWriter(Writer writer)
| Method Detail |
|---|
protected Writer getWriter()
public long write(Iterable<Vector> iterable)
throws IOException
VectorWriter
write in interface VectorWriteriterable - The Iterable to loop over
IOException - if there was a problem writing
public long write(Iterable<Vector> iterable,
long maxDocs)
throws IOException
VectorWritermaxDocs to the output.
write in interface VectorWriteriterable - The Iterable to loop overmaxDocs - the maximum number of docs to write
IOException - if there was a problem writing
public void write(Vector vector)
throws IOException
VectorWriter
write in interface VectorWritervector - The Vector to write
IOException
public void close()
throws IOException
close in interface CloseableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||