use crate::deps::*;
use crate::arf_types::*;
use crate::flint::*;
use crate::fmpz_types::*;
use crate::gr_types::*;
use crate::mpoly_types::*;
pub const FEXPR_TYPE_BITS: u32 = 4;
pub const FEXPR_SMALL_SYMBOL_LEN: u32 = 7;
pub const FEXPR_LATEX_SMALL: u32 = 1;
pub const FEXPR_LATEX_LOGIC: u32 = 2;
#[repr(C)]
pub struct fexpr_struct {
pub data: *mut ulong,
pub alloc: slong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of fexpr_struct"][::std::mem::size_of::<fexpr_struct>() - 16usize];
["Alignment of fexpr_struct"][::std::mem::align_of::<fexpr_struct>() - 8usize];
["Offset of field: fexpr_struct::data"][::std::mem::offset_of!(fexpr_struct, data) - 0usize];
["Offset of field: fexpr_struct::alloc"][::std::mem::offset_of!(fexpr_struct, alloc) - 8usize];
};
impl Default for fexpr_struct {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type fexpr_t = [fexpr_struct; 1usize];
pub type fexpr_ptr = *mut fexpr_struct;
pub type fexpr_srcptr = *const fexpr_struct;
#[repr(C)]
pub struct fexpr_vec_struct {
pub entries: *mut fexpr_struct,
pub alloc: slong,
pub length: slong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of fexpr_vec_struct"][::std::mem::size_of::<fexpr_vec_struct>() - 24usize];
["Alignment of fexpr_vec_struct"][::std::mem::align_of::<fexpr_vec_struct>() - 8usize];
["Offset of field: fexpr_vec_struct::entries"]
[::std::mem::offset_of!(fexpr_vec_struct, entries) - 0usize];
["Offset of field: fexpr_vec_struct::alloc"]
[::std::mem::offset_of!(fexpr_vec_struct, alloc) - 8usize];
["Offset of field: fexpr_vec_struct::length"]
[::std::mem::offset_of!(fexpr_vec_struct, length) - 16usize];
};
impl Default for fexpr_vec_struct {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type fexpr_vec_t = [fexpr_vec_struct; 1usize];
extern "C" {
#[link_name = "fexpr_init__extern"]
pub fn fexpr_init(expr: *mut fexpr_struct);
#[link_name = "fexpr_clear__extern"]
pub fn fexpr_clear(expr: *mut fexpr_struct);
#[link_name = "_fexpr_vec_init__extern"]
pub fn _fexpr_vec_init(len: slong) -> fexpr_ptr;
#[link_name = "_fexpr_vec_clear__extern"]
pub fn _fexpr_vec_clear(vec: fexpr_ptr, len: slong);
#[link_name = "fexpr_fit_size__extern"]
pub fn fexpr_fit_size(expr: *mut fexpr_struct, size: slong);
#[link_name = "_fexpr_size__extern"]
pub fn _fexpr_size(expr: *const ulong) -> slong;
#[link_name = "fexpr_size__extern"]
pub fn fexpr_size(expr: *const fexpr_struct) -> slong;
#[link_name = "fexpr_set__extern"]
pub fn fexpr_set(res: *mut fexpr_struct, expr: *const fexpr_struct);
#[link_name = "fexpr_swap__extern"]
pub fn fexpr_swap(a: *mut fexpr_struct, b: *mut fexpr_struct);
#[link_name = "fexpr_equal__extern"]
pub fn fexpr_equal(a: *const fexpr_struct, b: *const fexpr_struct) -> libc::c_int;
pub fn fexpr_equal_si(expr: *const fexpr_struct, c: slong) -> libc::c_int;
pub fn fexpr_equal_ui(expr: *const fexpr_struct, c: ulong) -> libc::c_int;
pub fn fexpr_hash(expr: *const fexpr_struct) -> ulong;
pub fn fexpr_cmp_fast(a: *const fexpr_struct, b: *const fexpr_struct) -> libc::c_int;
pub fn _fexpr_vec_sort_fast(vec: fexpr_ptr, len: slong);
#[link_name = "_fexpr_is_integer__extern"]
pub fn _fexpr_is_integer(expr: *const ulong) -> libc::c_int;
#[link_name = "fexpr_is_integer__extern"]
pub fn fexpr_is_integer(expr: *const fexpr_struct) -> libc::c_int;
pub fn fexpr_is_neg_integer(expr: *const fexpr_struct) -> libc::c_int;
#[link_name = "_fexpr_is_symbol__extern"]
pub fn _fexpr_is_symbol(expr: *const ulong) -> libc::c_int;
#[link_name = "fexpr_is_symbol__extern"]
pub fn fexpr_is_symbol(expr: *const fexpr_struct) -> libc::c_int;
#[link_name = "_fexpr_is_string__extern"]
pub fn _fexpr_is_string(expr: *const ulong) -> libc::c_int;
#[link_name = "fexpr_is_string__extern"]
pub fn fexpr_is_string(expr: *const fexpr_struct) -> libc::c_int;
#[link_name = "_fexpr_is_atom__extern"]
pub fn _fexpr_is_atom(expr: *const ulong) -> libc::c_int;
#[link_name = "fexpr_is_atom__extern"]
pub fn fexpr_is_atom(expr: *const fexpr_struct) -> libc::c_int;
#[link_name = "fexpr_zero__extern"]
pub fn fexpr_zero(res: *mut fexpr_struct);
#[link_name = "fexpr_is_zero__extern"]
pub fn fexpr_is_zero(expr: *const fexpr_struct) -> libc::c_int;
pub fn fexpr_set_si(res: *mut fexpr_struct, c: slong);
pub fn fexpr_set_ui(res: *mut fexpr_struct, c: ulong);
pub fn fexpr_set_fmpz(res: *mut fexpr_struct, c: *const fmpz);
pub fn fexpr_get_fmpz(c: *mut fmpz, x: *const fexpr_struct) -> libc::c_int;
pub fn fexpr_set_fmpq(res: *mut fexpr_struct, x: *const fmpq);
#[link_name = "fexpr_set_symbol_builtin__extern"]
pub fn fexpr_set_symbol_builtin(res: *mut fexpr_struct, id: slong);
pub fn fexpr_set_symbol_str(res: *mut fexpr_struct, s: *const libc::c_char);
pub fn fexpr_set_string(res: *mut fexpr_struct, s: *const libc::c_char);
pub fn fexpr_get_symbol_str(expr: *const fexpr_struct) -> *mut libc::c_char;
pub fn fexpr_get_string(expr: *const fexpr_struct) -> *mut libc::c_char;
pub fn fexpr_get_decimal_str(
expr: *const fexpr_struct,
digits: slong,
flags: ulong,
) -> *mut libc::c_char;
pub fn fexpr_depth(expr: *const fexpr_struct) -> slong;
pub fn fexpr_num_leaves(expr: *const fexpr_struct) -> slong;
#[link_name = "fexpr_size_bytes__extern"]
pub fn fexpr_size_bytes(expr: *const fexpr_struct) -> slong;
#[link_name = "fexpr_allocated_bytes__extern"]
pub fn fexpr_allocated_bytes(expr: *const fexpr_struct) -> slong;
#[link_name = "fexpr_is_any_builtin_symbol__extern"]
pub fn fexpr_is_any_builtin_symbol(expr: *const fexpr_struct) -> libc::c_int;
#[link_name = "fexpr_is_builtin_symbol__extern"]
pub fn fexpr_is_builtin_symbol(expr: *const fexpr_struct, i: slong) -> libc::c_int;
pub fn fexpr_is_builtin_call(expr: *const fexpr_struct, i: slong) -> libc::c_int;
pub fn fexpr_is_any_builtin_call(expr: *const fexpr_struct) -> libc::c_int;
#[link_name = "fexpr_nargs__extern"]
pub fn fexpr_nargs(expr: *const fexpr_struct) -> slong;
pub fn fexpr_func(res: *mut fexpr_struct, expr: *const fexpr_struct);
pub fn fexpr_view_func(res: *mut fexpr_struct, expr: *const fexpr_struct);
pub fn fexpr_arg(res: *mut fexpr_struct, expr: *const fexpr_struct, i: slong);
pub fn fexpr_view_arg(res: *mut fexpr_struct, expr: *const fexpr_struct, i: slong);
#[link_name = "fexpr_view_next__extern"]
pub fn fexpr_view_next(view: *mut fexpr_struct);
pub fn fexpr_call0(res: *mut fexpr_struct, f: *const fexpr_struct);
pub fn fexpr_call1(res: *mut fexpr_struct, f: *const fexpr_struct, x1: *const fexpr_struct);
pub fn fexpr_call2(
res: *mut fexpr_struct,
f: *const fexpr_struct,
x1: *const fexpr_struct,
x2: *const fexpr_struct,
);
pub fn fexpr_call3(
res: *mut fexpr_struct,
f: *const fexpr_struct,
x1: *const fexpr_struct,
x2: *const fexpr_struct,
x3: *const fexpr_struct,
);
pub fn fexpr_call4(
res: *mut fexpr_struct,
f: *const fexpr_struct,
x1: *const fexpr_struct,
x2: *const fexpr_struct,
x3: *const fexpr_struct,
x4: *const fexpr_struct,
);
pub fn fexpr_call_vec(
res: *mut fexpr_struct,
f: *const fexpr_struct,
args: fexpr_srcptr,
len: slong,
);
pub fn fexpr_call_builtin1(res: *mut fexpr_struct, f: slong, x: *const fexpr_struct);
pub fn fexpr_call_builtin2(
res: *mut fexpr_struct,
f: slong,
x: *const fexpr_struct,
y: *const fexpr_struct,
);
pub fn fexpr_contains(expr: *const fexpr_struct, x: *const fexpr_struct) -> libc::c_int;
pub fn fexpr_replace(
res: *mut fexpr_struct,
expr: *const fexpr_struct,
x: *const fexpr_struct,
y: *const fexpr_struct,
) -> libc::c_int;
pub fn fexpr_replace2(
res: *mut fexpr_struct,
expr: *const fexpr_struct,
x1: *const fexpr_struct,
y1: *const fexpr_struct,
x2: *const fexpr_struct,
y2: *const fexpr_struct,
) -> libc::c_int;
pub fn fexpr_replace_vec(
res: *mut fexpr_struct,
expr: *const fexpr_struct,
xs: *const fexpr_vec_struct,
ys: *const fexpr_vec_struct,
) -> libc::c_int;
pub fn fexpr_write(stream: *mut gr_stream_struct, expr: *const fexpr_struct);
pub fn fexpr_print(expr: *const fexpr_struct);
pub fn fexpr_get_str(expr: *const fexpr_struct) -> *mut libc::c_char;
pub fn fexpr_write_latex(out: *mut gr_stream_struct, expr: *const fexpr_struct, flags: ulong);
pub fn fexpr_print_latex(expr: *const fexpr_struct, flags: ulong);
pub fn fexpr_get_str_latex(expr: *const fexpr_struct, flags: ulong) -> *mut libc::c_char;
pub fn fexpr_write_latex_call(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_subscript(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_subscript_call(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_infix(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_mul(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_div(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_neg_pos(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_add(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_sub(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_pow(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_exp(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_factorial(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_integral(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_sum_product(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_divsum(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_limit(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_derivative(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_logic(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_collection(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_matrix(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_simple(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_simple2(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_simple2_small(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_alg_structure(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_setop(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_cases(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_where(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_show_form(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_range(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_decimal(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_call1_optional_derivative(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_call2_optional_derivative(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_sub1_call1_optional_derivative(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_sub1_call2_optional_derivative(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_misc_special(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_write_latex_residue(
out: *mut gr_stream_struct,
expr: *const fexpr_struct,
flags: ulong,
);
pub fn fexpr_set_arf(res: *mut fexpr_struct, x: *const arf_struct);
pub fn fexpr_set_d(res: *mut fexpr_struct, x: f64);
pub fn fexpr_set_re_im_d(res: *mut fexpr_struct, x: f64, y: f64);
pub fn fexpr_neg(res: *mut fexpr_struct, a: *const fexpr_struct);
pub fn fexpr_add(res: *mut fexpr_struct, a: *const fexpr_struct, b: *const fexpr_struct);
pub fn fexpr_sub(res: *mut fexpr_struct, a: *const fexpr_struct, b: *const fexpr_struct);
pub fn fexpr_mul(res: *mut fexpr_struct, a: *const fexpr_struct, b: *const fexpr_struct);
pub fn fexpr_div(res: *mut fexpr_struct, a: *const fexpr_struct, b: *const fexpr_struct);
pub fn fexpr_pow(res: *mut fexpr_struct, a: *const fexpr_struct, b: *const fexpr_struct);
pub fn fexpr_is_arithmetic_operation(expr: *const fexpr_struct) -> libc::c_int;
pub fn fexpr_arithmetic_nodes(nodes: *mut fexpr_vec_struct, expr: *const fexpr_struct);
pub fn fexpr_get_fmpz_mpoly_q(
res: *mut fmpz_mpoly_q_struct,
expr: *const fexpr_struct,
vars: *const fexpr_vec_struct,
ctx: *const fmpz_mpoly_ctx_struct,
) -> libc::c_int;
pub fn fexpr_set_fmpz_mpoly(
res: *mut fexpr_struct,
poly: *const fmpz_mpoly_struct,
vars: *const fexpr_vec_struct,
ctx: *const fmpz_mpoly_ctx_struct,
);
pub fn fexpr_set_fmpz_mpoly_q(
res: *mut fexpr_struct,
frac: *const fmpz_mpoly_q_struct,
vars: *const fexpr_vec_struct,
ctx: *const fmpz_mpoly_ctx_struct,
);
pub fn fexpr_expanded_normal_form(
res: *mut fexpr_struct,
expr: *const fexpr_struct,
flags: ulong,
) -> libc::c_int;
#[link_name = "fexpr_vec_init__extern"]
pub fn fexpr_vec_init(vec: *mut fexpr_vec_struct, len: slong);
#[link_name = "fexpr_vec_print__extern"]
pub fn fexpr_vec_print(F: *const fexpr_vec_struct);
#[link_name = "fexpr_vec_swap__extern"]
pub fn fexpr_vec_swap(x: *mut fexpr_vec_struct, y: *mut fexpr_vec_struct);
#[link_name = "fexpr_vec_fit_length__extern"]
pub fn fexpr_vec_fit_length(vec: *mut fexpr_vec_struct, len: slong);
#[link_name = "fexpr_vec_clear__extern"]
pub fn fexpr_vec_clear(vec: *mut fexpr_vec_struct);
#[link_name = "fexpr_vec_set__extern"]
pub fn fexpr_vec_set(dest: *mut fexpr_vec_struct, src: *const fexpr_vec_struct);
#[link_name = "fexpr_vec_append__extern"]
pub fn fexpr_vec_append(vec: *mut fexpr_vec_struct, f: *const fexpr_struct);
#[link_name = "fexpr_vec_insert_unique__extern"]
pub fn fexpr_vec_insert_unique(vec: *mut fexpr_vec_struct, f: *const fexpr_struct) -> slong;
#[link_name = "fexpr_vec_set_length__extern"]
pub fn fexpr_vec_set_length(vec: *mut fexpr_vec_struct, len: slong);
}