public static Iterator < MatrixEntry > getMatrixFileIterator ( File matrixFile , Format fileFormat ) throws IOException { switch ( fileFormat ) { case DENSE_TEXT : return new DenseTextFileIterator ( matrixFile ) ; case SVDLIBC_SPARSE_BINARY : return new SvdlibcSparseBinaryFileIterator ( matrixFile ) ; case SVDLIBC_SPARSE_TEXT : return new SvdlibcSparseTextFileIterator ( matrixFile ) ; case SVDLIBC_DENSE_BINARY : return new SvdlibcDenseBinaryFileIterator ( matrixFile ) ; case CLUTO_SPARSE : return new ClutoSparseFileIterator ( matrixFile ) ; case CLUTO_DENSE : // Cluto dense and svdlibc's dense text formats are equivalent. case SVDLIBC_DENSE_TEXT : return new SvdlibcDenseTextFileIterator ( matrixFile ) ; case MATLAB_SPARSE : return new MatlabSparseFileIterator ( matrixFile ) ; } throw new Error ( "Iterating over matrices of " + fileFormat + " format is not " + "currently supported. Email " + "s-space-research-dev@googlegroups.com to request its" + "inclusion and it will be quickly added" ) ; }
Returns an iterator over the matrix entries in the data file . For sparse formats that specify only non - zero no zero valued entries will be returened . Conversely for dense matrix formats all of the entries including zero entries will be returned .