<commit_before>/* Copyright (C) 2005-2008 <NAME>.
   Copyright (C) 2007 <NAME>.
   Copyright (C) 2011 <NAME>.

   This file is part of fplll. fplll is free software: you
   can redistribute it and/or modify it under the terms of the GNU Lesser
   General Public License as published by the Free Software Foundation,
   either version 2.1 of the License, or (at your option) any later version.

   fplll is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License
   along with fplll. If not, see <http://www.gnu.org/licenses/>. */

#ifndef FPLLL_WRAPPER_H
#define FPLLL_WRAPPER_H

#include "nr/matrix.h"

FPLLL_BEGIN_NAMESPACE

/* The matrix b must not be modified before calling lll().
   lll() must be called only once. */

/**
 * @brief Wrapper. This class provides an externally callable API for LLL reducing some basis ``b``.
 * This class forcibly instantiates some template declarations (see FPLLL_DECLARE_LLL(T) for more
 * information at the bottom of this class) and provides an interface for calling provable,
 * heuristic and fast variants of both LLL and HLLL.
 *
 * User note: all of the parameters passed into this class are non-const references. Thus, this
 * class may overwrite these variables. In particular, the methods in this class typically
 * over-write the parameter ``u`` with the transformation matrix applied to ``b`` to produce LLL(B).
 * In other words, let C = LLL(B). Then we can write C = U^T B for some unimodular transformation
 * matrix U. For this reason, ``u`` should either be an empty matrix or the identity matrix when it
 * is passed in to this function, so that no information is lost.
 */
class Wrapper
{
public:
  /* u must be either empty of the identity matrix */
  Wrapper(ZZ_mat<mpz_t> &b, ZZ_mat<mpz_t> &u, ZZ_mat<mpz_t> &u_inv, double delta, double eta,
          int flags);

  // Used for HLLL
  Wrapper(ZZ_mat<mpz_t> &b, ZZ_mat<mpz_t> &u, ZZ_mat<mpz_t> &u_inv, double delta, double eta,
          double theta, double c, int flags);

  bool lll();

  // Call HLLL on the wrapper object<commit_msg>Typo fix.<commit_after>/* Copyright (C) 2005-2008 <NAME>.
   Copyright (C) 2007 <NAME>.
   Copyright (C) 2011 <NAME>.

   This file is part of fplll. fplll is free software: you
   can redistribute it and/or modify it under the terms of the GNU Lesser
   General Public License as published by the Free Software Foundation,
   either version 2.1 of the License, or (at your option) any later version.

   fplll is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License
   along with fplll. If not, see <http://www.gnu.org/licenses/>. */

#ifndef FPLLL_WRAPPER_H
#define FPLLL_WRAPPER_H

#include "nr/matrix.h"

FPLLL_BEGIN_NAMESPACE

/* The matrix b must not be modified before calling lll().
   lll() must be called only once. */

/**
 * @brief Wrapper. This class provides an externally callable API for LLL reducing some basis ``b``.
 * This class forcibly instantiates some template declarations (see FPLLL_DECLARE_LLL(T) for more
 * information at the bottom of this class) and provides an interface for calling provable,
 * heuristic and fast variants of both LLL and HLLL.
 *
 * User note: all of the parameters passed into this class are non-const references. Thus, this
 * class may overwrite these variables. In particular, the methods in this class typically
 * over-write the parameter ``u`` with the transformation matrix applied to ``b`` to produce LLL(B).
 * In other words, let C = LLL(B). Then we can write C = U^T B for some unimodular transformation
 * matrix U. For this reason, ``u`` should either be an empty matrix or the identity matrix when it
 * is passed in to this function, so that no information is lost.
 */
class Wrapper
{
public:
  /* u must be either empty or the identity matrix */
  Wrapper(ZZ_mat<mpz_t> &b, ZZ_mat<mpz_t> &u, ZZ_mat<mpz_t> &u_inv, double delta, double eta,
          int flags);

  // Used for HLLL
  Wrapper(ZZ_mat<mpz_t> &b, ZZ_mat<mpz_t> &u, ZZ_mat<mpz_t> &u_inv, double delta, double eta,
          double theta, double c, int flags);

  bool lll();

  // Call HLLL on the wrapper object
{'fraction_non_alphanumeric': 0.07667245873153779, 'fraction_numerical': 0.007819287576020852, 'mean_word_length': 3.6751269035532994, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3658521', 'n_tokens_mistral': 1407, 'n_tokens_neox': 1334, 'n_words': 660}