Package java.io

Examples of java.io.DataInputStream.readDouble()


            } else {
                src = bytes;
            }
            DataInputStream stream =
                  new DataInputStream(new ByteArrayInputStream(src, offset, 8));
            return stream.readDouble();
        } catch (Exception ex) {
            throw new DescriptorException(ex);
        }
    }
View Full Code Here


                long timeStep = dis.readLong();
                updateTimeRange(timeStep);
                // load that time step's vector
                for (int i = 0; i < dimensions; ++i) {
                    int index = dis.readInt();
                    double val = dis.readDouble();
                    semantics.put(Integer.valueOf(index), Double.valueOf(val));
                }
                // associate the time step with the semantics
                vector.setSemantics(timeStep, semantics);
            }
View Full Code Here

                // load that time step's vector
                Map<Integer,Double> semantics = new IntegerMap<Double>();
                for (int i = 0; i < nonZero; ++i) {
                    int index = dis.readInt();
                    double val = dis.readDouble();
                    semantics.put(Integer.valueOf(index), Double.valueOf(val));
                }
                // associate the time step with the semantics
                vector.setSemantics(timeStep, semantics);
            }
View Full Code Here

        for (int row = 0; row < rows; ++row) {
            String word = dis.readUTF();
            termToIndex.put(word, row);

            for (int col = 0; col < cols; ++col) {
                d[col] = dis.readDouble();
            }
            m.setRow(row, d);
        }
        return m;
    }
View Full Code Here

            int nonZero = dis.readInt();
            int[] indices = new int[nonZero];
            double[] values = new double[nonZero];
            for (int i = 0; i < nonZero; ++i) {
                int nz = dis.readInt();
                double val = dis.readDouble();
                indices[i] = nz;
                values[i] = val;
            }
            rowVectors[row] = new CompactSparseVector(indices, values, cols);
        }
View Full Code Here

    @Override
    public Double bytesToDouble(byte[] b) {
        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(b));
        try {
            return new Double(dis.readDouble());
        } catch (IOException e) {
            LogUtils.warn(this, "Unable to convert bytearray to double, " +
                    "caught IOException <" + e.getMessage() + ">",
                    PigWarning.FIELD_DISCARDED_TYPE_CONVERSION_FAILED,
                    mLog);
View Full Code Here

        d = dis.readInt();
        d1 = dis.readInt();
        d2 = dis.readInt();
        d3 = dis.readInt();
        B = dis.readInt();
        beta = dis.readDouble();
        normBound = dis.readDouble();
        signFailTolerance = dis.readInt();
        bitsF = dis.readInt();
        String alg = dis.readUTF();
        if ("SHA-512".equals(alg))
View Full Code Here

        d1 = dis.readInt();
        d2 = dis.readInt();
        d3 = dis.readInt();
        B = dis.readInt();
        beta = dis.readDouble();
        normBound = dis.readDouble();
        signFailTolerance = dis.readInt();
        bitsF = dis.readInt();
        String alg = dis.readUTF();
        if ("SHA-512".equals(alg))
        {
View Full Code Here

        d1 = dis.readInt();
        d2 = dis.readInt();
        d3 = dis.readInt();
        B = dis.readInt();
        basisType = dis.readInt();
        beta = dis.readDouble();
        normBound = dis.readDouble();
        keyNormBound = dis.readDouble();
        signFailTolerance = dis.readInt();
        primeCheck = dis.readBoolean();
        sparse = dis.readBoolean();
View Full Code Here

        d2 = dis.readInt();
        d3 = dis.readInt();
        B = dis.readInt();
        basisType = dis.readInt();
        beta = dis.readDouble();
        normBound = dis.readDouble();
        keyNormBound = dis.readDouble();
        signFailTolerance = dis.readInt();
        primeCheck = dis.readBoolean();
        sparse = dis.readBoolean();
        bitsF = dis.readInt();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.