code: public byte[] toByteArray() {
      ByteBuffer buffer = ByteBuffer.allocate(BYTES).order(ByteOrder.LITTLE_ENDIAN);
      xStats.writeTo(buffer);
      yStats.writeTo(buffer);
      buffer.putDouble(sumOfProductsOfDeltas);
      return buffer.array();
    }
docs: Gets a byte array representation of this instance.
  
  <p><b>Note:</b> No guarantees are made regarding stability of the representation between
  versions.