contains arithmetic operations for polynomials More...
Go to the source code of this file.
Classes | |
class | Polynomial |
Functions | |
void | enlarge_mstack () |
void | clear_mstack () |
void | deallocate_mstack () |
bool | mstack_is_empty () |
void | push_mstack_end (Monomial *t) |
void | push_mstack (Monomial *t) |
Polynomial * | build_poly () |
Polynomial * | add_poly (const Polynomial *p1, const Polynomial *p2) |
Polynomial * | multiply_poly (const Polynomial *p1, const Polynomial *p2) |
Polynomial * | multiply_poly_with_constant (const Polynomial *p1, mpz_t c) |
Polynomial * | divide_by_term (const Polynomial *p1, const Term *t) |
void | init_mpz (unsigned exp) |
void | clear_mpz () |
Variables | |
mpz_t | one |
gmp for 1 More... | |
mpz_t | minus_one |
gmp for -1 More... | |
mpz_t | base |
gmp for 2 More... | |
mpz_t | mod_coeff |
gmp for 2^NN More... | |
contains arithmetic operations for polynomials
Part of AMulet2.0 : AIG Multiplier Verification Tool. Copyright (C) 2020 Daniela Kaufmann, Johannes Kepler University Linz
Polynomial* add_poly | ( | const Polynomial * | p1, |
const Polynomial * | p2 | ||
) |
Add two polynomials p1+p2
p1 | Polynomial* |
p2 | Polynomial* |
Polynomial* build_poly | ( | ) |
Generates a polynomial from mstack and clears mstack
void clear_mpz | ( | ) |
Clears all globally allocated gmp objects
void clear_mstack | ( | ) |
Sets the number of elements in the stack to 0
void deallocate_mstack | ( | ) |
Deallocates mstack
Polynomial* divide_by_term | ( | const Polynomial * | p1, |
const Term * | t | ||
) |
Returns the quotient of dividing a polynomial p1 by a term t
p1 | Polynomial* |
t | Term * |
void enlarge_mstack | ( | ) |
Enlarges the allocated size of mstack
void init_mpz | ( | unsigned | exp | ) |
Initializes all global gmp objects
exp | unsigned exponent for mod coeff |
bool mstack_is_empty | ( | ) |
Checks whether mstack is empty
Polynomial* multiply_poly | ( | const Polynomial * | p1, |
const Polynomial * | p2 | ||
) |
Multiplies two polynomials p1*p2
p1 | Polynomial* |
p2 | Polynomial* |
Polynomial* multiply_poly_with_constant | ( | const Polynomial * | p1, |
mpz_t | c | ||
) |
Multiplies a polynomial p1 with a constant c
p1 | Polynomial* |
c | mpz_t object |
void push_mstack | ( | Monomial * | t | ) |
Pushes a monomial to the stack such that mstack remains sorted
t | monomial to be added to the mstack |
void push_mstack_end | ( | Monomial * | t | ) |
Pushes a monomial to the end of the stack
t | monomial to be added to the mstack |
mpz_t base |
gmp for 2
mpz_t minus_one |
gmp for -1
mpz_t mod_coeff |
gmp for 2^NN
mpz_t one |
gmp for 1