public class FvecImporter
extends java.lang.Object
Constructor and Description |
---|
FvecImporter() |
Modifier and Type | Method and Description |
---|---|
java.util.List<double[]> |
readFile(java.lang.String filename)
Reads a file in fvec (INRIA) format and return the samples as a list of
double arrays.
|
java.util.List<double[]> |
readInputStream(java.io.InputStream i)
Reads a stream in fvec (INRIA) format and return the samples as a list of
double arrays.
|
void |
writeFile(java.lang.String filename,
java.util.List<double[]> list)
Writes a list of features (double arrays) to a file in fvec (INRIA)
format.
|
public java.util.List<double[]> readFile(java.lang.String filename) throws java.io.IOException
filename
- to file to readjava.io.IOException
public java.util.List<double[]> readInputStream(java.io.InputStream i) throws java.io.IOException
i
- inputstream to read data fromjava.io.IOException
public void writeFile(java.lang.String filename, java.util.List<double[]> list) throws java.io.IOException
filename
- the name of the file to be writtenlist
- the list of featuresjava.io.IOException