Class AbstractPrimitiveMatrixReader<T extends AbstractGenericMatrix<?,​?>>

    • Constructor Detail

      • AbstractPrimitiveMatrixReader

        AbstractPrimitiveMatrixReader()
    • Method Detail

      • createOctaveValue

        abstract T createOctaveValue​(int[] size)
      • read

        public T read​(BufferedReader reader)
        The matrix formats, e.g. matrix come in two variants: after line with "type" the next line either starts with
        • # ndims: specifying the number of dimensions and in the next line the lengths in all these dimensions and all the following lines the vectorized data, each in a separate line. This is read by readVectorizedMatrix(BufferedReader, String).
        • # rows: specifying the number of rows and # columns: specifying the number of columns in the next line (which works only for matrices, i.e. up to dimension 2) and then for each row a line follows each of which holds the entries separated by a blank. This is read by read2dmatrix(BufferedReader, String).
        Specified by:
        read in class OctaveDataReader
        Parameters:
        reader - the Reader to read from, will not close reader
        Returns:
        the object read from reader.
      • readSizeVectorizedMatrix

        private int[] readSizeVectorizedMatrix​(BufferedReader reader,
                                               String ndimsLine)
        Reads a line num of dims followed by a line of dimensions: integers separated by blank and returns an array with the according entries. In particular the length is num of dims.