private void writeObject(ObjectOutputStream out) throws IOException {
    out.defaultWriteObject();
    if (backupLambda != null) {
      System.out.println("not interval ");
      int len = backupLambda.length;
      int nnz = 0;
      for (int i = 0; i < len; i++) {
        if (backupLambda[i] != 0) {
          nnz++;
        }
      }
      out.writeInt(len);
      out.writeInt(nnz);
      for (int i = 0; i < len; i++) {
        if (backupLambda[i] != 0) {
          out.writeInt(i);
          out.writeDouble(backupLambda[i]);
        }
      }
    }
  }