GiNaCRA
0.6.4
|
Data Structures | |
struct | infinitesimal_symbol_struct |
Type for infinitesimal values. More... | |
struct | ex_is_lessdeg |
Prototypal ordering on expressions which are terms. More... | |
struct | ex_is_less_deggrlex |
Graded lexicographic ordering on expressions which are terms. More... | |
struct | ex_is_less_degrevlex |
Lexicographic degree-reverse ordering on expressions which are terms. More... | |
struct | ex_is_under_the_staircase |
Relation determining whether the given expression is a monomial under the staircase, which is determined by computing the remainders dividing by the corners of a staircase. More... | |
struct | expair_is_lesseq |
Prototypal ordering on pairs of expressions which represent terms. More... | |
class | UnivariateRepresentation |
An implementation of a multi dimensional real algebraic number providing arithmetic and relational operations. More... | |
Typedefs | |
typedef GiNaC::infinitesimal_symbol_struct | infinitesimal_symbol |
Type for infinitesimal values. | |
Enumerations | |
enum | sign { NEGATIVE_SIGN, ZERO_SIGN, POSITIVE_SIGN } |
type for signs More... | |
Functions | |
const infinitesimal_symbol | EPSILON ("€") |
const infinitesimal_symbol | DELTA ("ð") |
const infinitesimal_symbol | GAMMA ("đ") |
const infinitesimal_symbol | ZETA ("¢") |
const symbol | X ("X") |
standard variable for standard polynomial objects | |
const numeric | ZERO (0) |
unique representation of zero | |
const ex | prod (const lst &l) throw ( invalid_argument ) |
Computes the product of a list of expressions. | |
const ex | lcm (const lst &l) throw ( invalid_argument ) |
Computes the least common multiple of a list of expressions. | |
long | lcm (long a, long b) |
Computes the least common multiple of two machine integers a and b. | |
long | gcd (long a, long b) |
Computes the greatest common divisor of two integers a and b. | |
long | numerator (long a, long b) |
Computes the numerator q such that b / a = q / r and q and r are coprime. | |
long | denominator (long a, long b) |
Computes the numerator r such that b / a = q / r and q and r are coprime. | |
bool | is_constant (const ex &polynomial, const vector< symbol > &symbolLst) |
Determines whether the given polynomial expression is constant in the given list of variables. | |
bool | is_rational_polynomial (const ex &p, const symbol &x) |
Tests whether the given expression p is a rational polynomial in x. | |
bool | is_realalgebraic_polynomial (const ex &p, const symbol &x) |
Tests whether the given expression p is a polynomial in x with real algebraic coefficients, i.e. | |
bool | is_realalgebraic_term (const ex &p) |
Tests whether the given expression p is a term only containing only numbers returning true on info(info_flags::numeric) && (info(info_flags::rational) || (info(info_flags::real) && info_flags::algebraic)) . | |
sign | sgn (const numeric &n) |
Determines the sign of the given numeric. | |
const ex | monpart (const ex &polynomial, const vector< symbol > &symbolLst) |
For internal use only! Computes the monomial underlying the given polynomial in case the polynomial is a single term. | |
const ex | coeffpart (const ex &polynomial, const vector< symbol > &symbolLst) |
For internal use only! Computes the polynomial coefficient underlying the given polynomial in case the polynomial is a single term. | |
void | isolateByVariables (const ex &polynomial, const vector< symbol > &symbolLst, ex &coefficient, ex &monomial) |
For internal use only! Determins the monomial and its coefficient of the given polynomial w.r.t. | |
const GiNaC::ex | rationalize (const GiNaC::ex &p, const vector< GiNaC::symbol > &symbolLst) |
Converts all coefficients of the given rational polynomial in the variables symbolLst to an exact rational numeric, so that is_rational_polynomial returns true. | |
const GiNaC::ex | rationalize (const GiNaC::ex &p, const GiNaC::symbol &s) |
Converts all coefficients of the given rational polynomial in the variable s to an exact rational numeric, so that is_rational_polynomial returns true. | |
const GiNaC::numeric | rationalize (const GiNaC::numeric &n) |
Converts the given numeric value to an exact numeric one. | |
const vector< symbol > | sortVariables (const vector< symbol > &l) |
Sorts the given list of symbols lexicographicly. | |
bool | symbol_is_lesseq_lex (const symbol &a, const symbol &b) |
Compares two expressions lexicographically by their string representations. | |
bool | symbol_is_less_lex (const symbol &a, const symbol &b) |
Compares two expressions lexicographically by their string representations. | |
const map< int, ex > | signedSubresultants (const ex &A, const ex &B, const symbol &sym) |
Returns the signed Subresultant sequence. | |
const vector< ex > | signedSubresultantsCoefficients (const ex &A, const ex &B, const symbol &sym) throw ( invalid_argument ) |
Returns the Signed Subresultant Coefficient sequence. |
Notation is following http://www.possibility.com/Cpp/CppCodingStandard.html.
Type for infinitesimal values.
enum GiNaC::sign |
type for signs
Definition at line 99 of file constants.h.
const ex GiNaC::coeffpart | ( | const ex & | polynomial, |
const vector< symbol > & | symbolLst | ||
) |
For internal use only! Computes the polynomial coefficient underlying the given polynomial in case the polynomial is a single term.
Otherwise the method returns 1.
polynomial | |
symbolLst |
Definition at line 160 of file utilities.cpp.
References isolateByVariables().
const infinitesimal_symbol GiNaC::DELTA | ( | "ð" | ) |
long GiNaC::denominator | ( | long | a, |
long | b | ||
) |
Computes the numerator r such that b / a = q / r and q and r are coprime.
a | |
b |
Definition at line 87 of file utilities.cpp.
References gcd().
Referenced by GiNaCRA::OpenInterval::findSample(), and GiNaCRA::OpenInterval::sample().
const infinitesimal_symbol GiNaC::EPSILON | ( | "€" | ) |
const infinitesimal_symbol GiNaC::GAMMA | ( | "đ" | ) |
long GiNaC::gcd | ( | long | a, |
long | b | ||
) |
Computes the greatest common divisor of two integers a and b.
a | |
b |
Definition at line 68 of file utilities.cpp.
Referenced by denominator(), GiNaCRA::OpenInterval::findSample(), GiNaCRA::UnivariatePolynomial::gcd(), lcm(), and numerator().
bool GiNaC::is_constant | ( | const ex & | polynomial, |
const vector< symbol > & | symbolLst | ||
) |
Determines whether the given polynomial expression is constant in the given list of variables.
polynomial | |
symbolLst |
Definition at line 92 of file utilities.cpp.
Referenced by isolateByVariables(), and GiNaCRA::MultivariatePolynomialMR::MultivariatePolynomialMR().
bool GiNaC::is_rational_polynomial | ( | const ex & | p, |
const symbol & | x | ||
) |
Tests whether the given expression p is a rational polynomial in x.
p | |
x |
Definition at line 100 of file utilities.cpp.
Referenced by GiNaCRA::RationalUnivariatePolynomial::RationalUnivariatePolynomial().
bool GiNaC::is_realalgebraic_polynomial | ( | const ex & | p, |
const symbol & | x | ||
) |
Tests whether the given expression p is a polynomial in x with real algebraic coefficients, i.e.
coefficients being rational or mixed terms with RealAlgebraicNumberIRs.
p | |
x |
Definition at line 113 of file utilities.cpp.
References is_realalgebraic_term().
bool GiNaC::is_realalgebraic_term | ( | const ex & | p | ) |
Tests whether the given expression p is a term only containing only numbers returning true
on info(info_flags::numeric) && (info(info_flags::rational) || (info(info_flags::real) && info_flags::algebraic))
.
p |
Definition at line 123 of file utilities.cpp.
Referenced by is_realalgebraic_polynomial().
void GiNaC::isolateByVariables | ( | const ex & | polynomial, |
const vector< symbol > & | symbolLst, | ||
ex & | coefficient, | ||
ex & | monomial | ||
) |
For internal use only! Determins the monomial and its coefficient of the given polynomial w.r.t.
the given list of variables, in case the polynomial is a single term. Otherwise the method returns 1.
polynomial | |
symbolLst | |
coefficient | refernce to the coefficient to isolate |
monomial | reference to the monomial to isolate |
Definition at line 168 of file utilities.cpp.
References is_constant().
Referenced by GiNaCRA::Constraint::checkVariables(), coeffpart(), monpart(), and rationalize().
const ex GiNaC::lcm | ( | const lst & | l | ) | throw ( invalid_argument ) |
Computes the least common multiple of a list of expressions.
l | list of expressions |
Definition at line 52 of file utilities.cpp.
Referenced by GiNaCRA::MultivariatePolynomialFactory::coefficientLcm(), and GiNaCRA::OpenInterval::findSample().
long GiNaC::lcm | ( | long | a, |
long | b | ||
) |
Computes the least common multiple of two machine integers a and b.
a | |
b |
Definition at line 62 of file utilities.cpp.
References gcd().
const ex GiNaC::monpart | ( | const ex & | polynomial, |
const vector< symbol > & | symbolLst | ||
) |
For internal use only! Computes the monomial underlying the given polynomial in case the polynomial is a single term.
Otherwise the method returns 1.
polynomial | |
symbolLst |
Definition at line 152 of file utilities.cpp.
References isolateByVariables().
long GiNaC::numerator | ( | long | a, |
long | b | ||
) |
Computes the numerator q such that b / a = q / r and q and r are coprime.
a | |
b |
Definition at line 82 of file utilities.cpp.
References gcd().
Referenced by GiNaCRA::OpenInterval::findSample(), and GiNaCRA::OpenInterval::sample().
const ex GiNaC::prod | ( | const lst & | l | ) | throw ( invalid_argument ) |
Computes the product of a list of expressions.
l | list of expressions |
Definition at line 42 of file utilities.cpp.
Referenced by GiNaCRA::MultivariatePolynomialFactory::specialGroebnerBasis().
const GiNaC::ex GiNaC::rationalize | ( | const GiNaC::ex & | p, |
const vector< GiNaC::symbol > & | symbolLst | ||
) |
Converts all coefficients of the given rational polynomial in the variables symbolLst to an exact rational numeric, so that is_rational_polynomial returns true.
p | |
symbolLst |
Definition at line 216 of file utilities.cpp.
References isolateByVariables().
Referenced by rationalize().
const GiNaC::ex GiNaC::rationalize | ( | const GiNaC::ex & | p, |
const GiNaC::symbol & | s | ||
) | [inline] |
Converts all coefficients of the given rational polynomial in the variable s to an exact rational numeric, so that is_rational_polynomial returns true.
p | |
s |
Definition at line 236 of file utilities.cpp.
References rationalize().
const GiNaC::numeric GiNaC::rationalize | ( | const GiNaC::numeric & | n | ) | [inline] |
Converts the given numeric value to an exact numeric one.
n |
Definition at line 241 of file utilities.cpp.
References rationalize().
sign GiNaC::sgn | ( | const numeric & | n | ) |
Determines the sign of the given numeric.
n | numeric |
Definition at line 147 of file utilities.cpp.
References NEGATIVE_SIGN, POSITIVE_SIGN, and ZERO_SIGN.
Referenced by GiNaCRA::OpenInterval::abs(), and GiNaCRA::Constraint::satisfiedBy().
const map< int, ex > GiNaC::signedSubresultants | ( | const ex & | A, |
const ex & | B, | ||
const symbol & | sym | ||
) |
Returns the signed Subresultant sequence.
The algorithm is originally from "New structure theorem for subresultants" - Henri Lombardi, Marie-Francoise Roy and Mohab Safey El Din. See page 11-12 for the algorithm and page 5 for the notation.
A | the first Polynomial |
B | the second Polynomial |
sym | the main variable |
Definition at line 269 of file utilities.cpp.
Referenced by signedSubresultantsCoefficients().
const vector< ex > GiNaC::signedSubresultantsCoefficients | ( | const ex & | A, |
const ex & | B, | ||
const symbol & | sym | ||
) | throw ( invalid_argument ) |
Returns the Signed Subresultant Coefficient sequence.
The vectors contains the i-th coefficient of the i-th element of Signed Subresultant sequence in the i-th position. The Algorithm calls calculateSignedSubresultants for the computation.
A | the first Polynomial |
B | the second Polynomial |
sym | the main variable |
Definition at line 381 of file utilities.cpp.
References signedSubresultants().
const vector< symbol > GiNaC::sortVariables | ( | const vector< symbol > & | l | ) |
Sorts the given list of symbols lexicographicly.
Definition at line 246 of file utilities.cpp.
References symbol_is_less_lex().
Referenced by GiNaCRA::MultivariatePolynomialFactory::generalPositionTemplate().
bool GiNaC::symbol_is_less_lex | ( | const symbol & | a, |
const symbol & | b | ||
) |
Compares two expressions lexicographically by their string representations.
a | |
b |
Definition at line 261 of file utilities.cpp.
Referenced by sortVariables().
bool GiNaC::symbol_is_lesseq_lex | ( | const symbol & | a, |
const symbol & | b | ||
) |
Compares two expressions lexicographically by their string representations.
a | |
b |
Definition at line 253 of file utilities.cpp.
const symbol GiNaC::X | ( | "X" | ) |
standard variable for standard polynomial objects
const numeric GiNaC::ZERO | ( | 0 | ) |
unique representation of zero
Referenced by GiNaCRA::CAD::samples().
const infinitesimal_symbol GiNaC::ZETA | ( | "¢" | ) |