# sage_setup: distribution = sagemath-flint
# distutils: libraries = flint
# distutils: depends = flint/qfb.h

################################################################################
# This file is auto-generated by the script
#   SAGE_ROOT/src/sage_setup/autogen/flint_autogen.py.
# From the commit 3e2c3a3e091106a25ca9c6fba28e02f2cbcd654a
# Do not modify by hand! Fix and rerun the script instead.
################################################################################

from libc.stdio cimport FILE
from sage.libs.gmp.types cimport *
from sage.libs.mpfr.types cimport *
from sage.libs.flint.types cimport *

cdef extern from "flint_wrap.h":
    void qfb_init(qfb_t q) noexcept
    void qfb_clear(qfb_t q) noexcept
    void qfb_array_clear(qfb ** forms, slong num) noexcept
    qfb_hash_t * qfb_hash_init(slong depth) noexcept
    void qfb_hash_clear(qfb_hash_t * qhash, slong depth) noexcept
    void qfb_hash_insert(qfb_hash_t * qhash, qfb_t q, qfb_t q2, slong it, slong depth) noexcept
    slong qfb_hash_find(qfb_hash_t * qhash, qfb_t q, slong depth) noexcept
    void qfb_set(qfb_t f, qfb_t g) noexcept
    bint qfb_equal(qfb_t f, qfb_t g) noexcept
    void qfb_print(qfb_t q) noexcept
    void qfb_discriminant(fmpz_t D, qfb_t f) noexcept
    void qfb_reduce(qfb_t r, qfb_t f, fmpz_t D) noexcept
    bint qfb_is_reduced(qfb_t r) noexcept
    slong qfb_reduced_forms(qfb ** forms, slong d) noexcept
    slong qfb_reduced_forms_large(qfb ** forms, slong d) noexcept
    void qfb_nucomp(qfb_t r, const qfb_t f, const qfb_t g, fmpz_t D, fmpz_t L) noexcept
    void qfb_nudupl(qfb_t r, const qfb_t f, fmpz_t D, fmpz_t L) noexcept
    void qfb_pow_ui(qfb_t r, qfb_t f, fmpz_t D, ulong exp) noexcept
    void qfb_pow(qfb_t r, qfb_t f, fmpz_t D, fmpz_t exp) noexcept
    void qfb_inverse(qfb_t r, qfb_t f) noexcept
    bint qfb_is_principal_form(qfb_t f, fmpz_t D) noexcept
    void qfb_principal_form(qfb_t f, fmpz_t D) noexcept
    bint qfb_is_primitive(qfb_t f) noexcept
    void qfb_prime_form(qfb_t r, fmpz_t D, fmpz_t p) noexcept
    int qfb_exponent_element(fmpz_t exponent, qfb_t f, fmpz_t n, ulong B1, ulong B2_sqrt) noexcept
    int qfb_exponent(fmpz_t exponent, fmpz_t n, ulong B1, ulong B2_sqrt, slong c) noexcept
    int qfb_exponent_grh(fmpz_t exponent, fmpz_t n, ulong B1, ulong B2_sqrt) noexcept
