public void writePitchHeaderOld(LEDataOutputStream ler) throws IOException { ler.writeDouble(windowSizeInSeconds); ler.writeDouble(skipSizeInSeconds); ler.writeInt(fs); ler.writeInt(numfrm); }
public static void writeMfccsFloat(MaryRandomAccessFile stream, double[][] mfccs) throws IOException { if (stream != null && mfccs != null && mfccs.length > 0) { int i, j; for (i = 0; i < mfccs.length; i++) { for (j = 0; j < mfccs[i].length; j++) stream.writeFloat((float) mfccs[i][j]); } stream.close(); } }
public final double[] readDouble(int len) throws IOException { double[] ret = new double[len]; for (int i = 0; i < len; i++) ret[i] = readDouble(); return ret; }
public final void writeInt(int[] v, int startPos, int len) throws IOException { assert v.length < startPos + len; for (int i = startPos; i < startPos + len; i++) writeInt(v[i]); }
public final double[] readDouble(int len) throws IOException { double[] ret = new double[len]; for (int i = 0; i < len; i++) ret[i] = readDouble(); return ret; }
public final float[] readFloat(int len) throws IOException { float[] ret = new float[len]; for (int i = 0; i < len; i++) ret[i] = readFloat(); return ret; }
public final float[] readFloatEndian(int len) throws IOException { float[] ret = new float[len]; for (int i = 0; i < len; i++) ret[i] = readFloatEndian(); return ret; }
public final long[] readLongEndian(int len) throws IOException { long[] ret = new long[len]; for (int i = 0; i < len; i++) ret[i] = readLongEndian(); return ret; }
public final void writeFloat(float[] v, int startPos, int len) throws IOException { assert v.length < startPos + len; for (int i = startPos; i < startPos + len; i++) writeFloat(v[i]); }
/** * Get an integer property from the underlying properties. * * @param property * the property requested * @return the integer property value if found, -1 otherwise. */ public int getInteger(String property) { return getInteger(property, -1); }
public final int[] readInt(int len) throws IOException { int[] ret = new int[len]; for (int i = 0; i < len; i++) ret[i] = readInt(); return ret; }
public void writeToTextFile(String textFile) { double[] tmpOut = new double[5]; tmpOut[0] = referenceVsMethod1.mean; tmpOut[1] = referenceVsMethod1.std; tmpOut[2] = referenceVsMethod2.mean; tmpOut[3] = referenceVsMethod2.std; tmpOut[4] = referenceVsMethod1.mean - referenceVsMethod2.mean; FileUtils.writeToTextFile(tmpOut, textFile); } }
public final void writeByte(byte[] v, int startPos, int len) throws IOException { assert v.length < startPos + len; for (int i = startPos; i < startPos + len; i++) writeByte(v[i]); }
public final boolean[] readBoolean(int len) throws IOException { boolean[] ret = new boolean[len]; for (int i = 0; i < len; i++) ret[i] = readBoolean(); return ret; }
public final int[] readUnsignedShort(int len) throws IOException { int[] ret = new int[len]; for (int i = 0; i < len; i++) ret[i] = readUnsignedShort(); return ret; }
public final void writeByteEndian(byte[] v, int startPos, int len) throws IOException { assert v.length < startPos + len; for (int i = startPos; i < startPos + len; i++) writeByteEndian(v[i]); }
public final byte[] readByte(int len) throws IOException { byte[] ret = new byte[len]; for (int i = 0; i < len; i++) ret[i] = readByte(); return ret; }
public void writePitchHeaderOld(LEDataOutputStream ler) throws IOException { ler.writeDouble(windowSizeInSeconds); ler.writeDouble(skipSizeInSeconds); ler.writeInt(fs); ler.writeInt(numfrm); }
public final int[] readDoubleToInt(int len) throws IOException { int[] ret = new int[len]; for (int i = 0; i < len; i++) ret[i] = (int) readDouble(); return ret; }
public void writeToTextFile(String textFile) { double[] tmpOut = new double[5]; tmpOut[0] = referenceVsMethod1.mean; tmpOut[1] = referenceVsMethod1.std; tmpOut[2] = referenceVsMethod2.mean; tmpOut[3] = referenceVsMethod2.std; tmpOut[4] = referenceVsMethod1.mean - referenceVsMethod2.mean; FileUtils.writeToTextFile(tmpOut, textFile); } }