Examples of writeFloat()


Examples of java.io.DataOutputStream.writeFloat()

      while (iterA.hasNext())
        outStream.writeDouble(iterA.getDoubleNext());

    } else if (classType == float.class) {
      while (iterA.hasNext())
        outStream.writeFloat(iterA.getFloatNext());

    } else if (classType == long.class) {
      while (iterA.hasNext())
        outStream.writeLong(iterA.getLongNext());
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

      while (iterA.hasNext())
        outStream.writeDouble(iterA.getDoubleNext());

    } else if (classType == float.class) {
      while (iterA.hasNext())
        outStream.writeFloat(iterA.getFloatNext());

    } else if (classType == long.class) {
      while (iterA.hasNext())
        outStream.writeLong(iterA.getLongNext());
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

        DataOutputStream o = new DataOutputStream(bo);
        o.writeByte((byte)2);
        o.writeShort((short)2);
        o.writeInt(2);
        o.writeLong(2L);
        o.writeFloat(1.1f);
        o.writeDouble(1.1);
        byte[] src = bo.toByteArray();

        LinkedBufferInput b = new LinkedBufferInput(1024);
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

        DataOutputStream o = new DataOutputStream(bo);
        o.writeByte((byte)2);
        o.writeShort((short)2);
        o.writeInt(2);
        o.writeLong(2L);
        o.writeFloat(1.1f);
        o.writeDouble(1.1);
        byte[] src = bo.toByteArray();

        LinkedBufferInput b = new LinkedBufferInput(1024);
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

        o2.writeShort((short)2);
        o1.writeInt(2);
        o2.writeInt(2);
        o1.writeLong(2L);
        o2.writeLong(2L);
        o1.writeFloat(1.1f);
        o2.writeFloat(1.1f);
        o1.writeDouble(1.1);
        o2.writeDouble(1.1);
        byte[] b1 = bo.toByteArray();
        byte[] b2 = o2.toByteArray();
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

        o2.writeByteAndInt((byte)9, 2);
        o1.writeByte((byte)9);
        o1.writeLong(2L);
        o2.writeByteAndLong((byte)9, 2L);
        o1.writeByte((byte)9);
        o1.writeFloat(1.1f);
        o2.writeByteAndFloat((byte)9, 1.1f);
        o1.writeByte((byte)9);
        o1.writeDouble(1.1);
        o2.writeByteAndDouble((byte)9, 1.1);
        byte[] b1 = bo.toByteArray();
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

                // Transform all non zero values for the new matrix.
                for (int index = 0; index < nzInCurCol; ++index) {
                    int row = dis.readInt();
                    double value = dis.readFloat();
                    dos.writeInt(row);
                    dos.writeFloat(
                            (float) transform.transform(row, col, value));
                }
            }
            dos.close();
            return outFile;
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

                    dos.writeInt(colCount);           
                }
           
                for (int i = 0; i < nonZeroRows.length; ++i) {
                    dos.writeInt(nonZeroRows[i]);
                    dos.writeFloat(values[i]);
                }
            }
        }
        dos.close();
    }
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

                new BufferedOutputStream(new FileOutputStream(output)));
            outStream.writeInt(matrix.rows());
            outStream.writeInt(matrix.columns());
            for (int i = 0; i < matrix.rows(); ++i) {
                for (int j = 0; j < matrix.columns(); ++j) {
                    outStream.writeFloat((float)matrix.get(i,j));
                }
            }
            outStream.close();
            break;
        }
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

                        double val = matrix.get(row, col);
                        if (val != 0) {
                            // NOTE: need to convert to float since this is what
                            // SVDLIBC uses
                            outStream.writeInt(row);
                            outStream.writeFloat((float)val);
                        }
                    }
                }
            }
            outStream.close();
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.