public byte[] getByteArrayRepresentation() {
   byte[] result = new byte[correlogram.length * correlogram[0].length * 4 + 5];
   for (int i = 0; i < correlogram.length; i++) {
     System.arraycopy(
         SerializationUtils.toByteArray(correlogram[i]),
         0,
         result,
         i * correlogram[i].length * 4,
         correlogram[i].length * 4);
   }
   System.arraycopy(SerializationUtils.toBytes(numBins), 0, result, result.length - 5, 4);
   result[result.length - 1] = (byte) distanceSet.length;
   return result;
 }
Example #2
0
 public byte[] getByteArrayRepresentation() {
   return SerializationUtils.toByteArray(histogram);
 }