Logo Search packages:      
Sourcecode: jblas version File versions  Download package

void org::jblas::la::DoubleMatrix::in ( DataInputStream  dis  )  throws IOException [inline]

Reads in a matrix from the given data stream. Note that the old data of this matrix will be discarded.

dis the data input stream to read from.

Definition at line 2239 of file DoubleMatrix.java.

References columns, data, and rows.

Referenced by load().

        if (!dis.readUTF().equals("double")) {
            throw new IllegalStateException("The matrix in the specified file is not of the correct type!");

        this.columns = dis.readInt();
        this.rows = dis.readInt();

        final int MAX = dis.readInt();
        data = new double[MAX];
        for (int i = 0; i < MAX; i++) {
            data[i] = dis.readDouble();

Generated by  Doxygen 1.6.0   Back to index