Package java.io

Examples of java.io.DataOutputStream.writeFloat()


        d.writeInt(this.IterationComplete);
        d.writeInt(this.CurrentIteration);
       
        d.writeInt(this.TrainedRecords);
        //d.writeFloat(this.AvgLogLikelihood);
        d.writeFloat(this.PercentCorrect);
        d.writeDouble(this.RMSE);
       
        //d.write
       
        // buf.write
View Full Code Here


                for (int k=0; k<alen; k++)
                  dos.writeLong(((long[])obj)[k+offset]);
                break;
              case TFormat.CF_FLOAT:
                for (int k=0; k<alen; k++)
                  dos.writeFloat(((float[])obj)[k+offset]);
                break;
              case TFormat.CF_DOUBLE:
                for (int k=0; k<alen; k++)
                  dos.writeDouble(((double[])obj)[k+offset]);
                break;
View Full Code Here

    byte b1, b2, barr[];
    try
    {
      ByteArrayOutputStream bs = new ByteArrayOutputStream(4);
      DataOutputStream ds = new DataOutputStream(bs);
      ds.writeFloat(fval);
      barr = bs.toByteArray();
      b1 = barr[0];
      b2 = barr[1];
      barr[0] = barr[3];
      barr[1] = barr[2];
View Full Code Here

    byte b1, b2, barr[];
    try
    {
      ByteArrayOutputStream bs = new ByteArrayOutputStream(farr.length*4);
      DataOutputStream ds = new DataOutputStream(bs);
      for (int i=0; i<farr.length; i++) ds.writeFloat(farr[i]);
      barr = bs.toByteArray();
      for (int i=0; i<barr.length; i += 4)
      {
        b1 = barr[i];
        b2 = barr[i+1];
View Full Code Here

    byte b1, b2, barr[];
    try
    {
      ByteArrayOutputStream bs = new ByteArrayOutputStream(4);
      DataOutputStream ds = new DataOutputStream(bs);
      ds.writeFloat(fval);
      barr = bs.toByteArray();
      b1 = barr[0];
      b2 = barr[1];
      barr[0] = barr[3];
      barr[1] = barr[2];
View Full Code Here

    byte b1, b2, barr[];
    try
    {
      ByteArrayOutputStream bs = new ByteArrayOutputStream(farr.length*4);
      DataOutputStream ds = new DataOutputStream(bs);
      for (int i=0; i<farr.length; i++) ds.writeFloat(farr[i]);
      barr = bs.toByteArray();
      for (int i=0; i<barr.length; i += 4)
      {
        b1 = barr[i];
        b2 = barr[i+1];
View Full Code Here

        out = new DataOutputStream(bos);
       
        out.writeInt(sizeX);
        out.writeInt(sizeZ);
       
        out.writeFloat(resolutionX);
        out.writeFloat(resolutionZ);

        for (int i = 0; i < sizeZ; i++) {
            int len = grid.get(i).size()-1;
            for (int j = len; j >= 0; j--) {
View Full Code Here

       
        out.writeInt(sizeX);
        out.writeInt(sizeZ);
       
        out.writeFloat(resolutionX);
        out.writeFloat(resolutionZ);

        for (int i = 0; i < sizeZ; i++) {
            int len = grid.get(i).size()-1;
            for (int j = len; j >= 0; j--) {
                out.writeFloat((float)grid.get(i).get(j).y);
View Full Code Here

        out.writeFloat(resolutionZ);

        for (int i = 0; i < sizeZ; i++) {
            int len = grid.get(i).size()-1;
            for (int j = len; j >= 0; j--) {
                out.writeFloat((float)grid.get(i).get(j).y);
            }
        }
        out.flush();

View Full Code Here

    ByteArrayOutputStream byteOut = new ByteArrayOutputStream(4);
    DataOutputStream dataOut = new DataOutputStream(byteOut);
    byte bytes[] = new byte[4];
   
    try {
      dataOut.writeFloat(value);
      dataOut.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
    bytes = byteOut.toByteArray();
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.