#include <limits>
#include <list>
#include <vector>
+#include <stack>
#ifdef DEBUGFACTOR
#include <ostream>
#endif
struct make_modular_map : public map_function {
cl_modint_ring R;
make_modular_map(const cl_modint_ring& R_) : R(R_) { }
- ex operator()(const ex& e)
+ ex operator()(const ex& e) override
{
if ( is_a<add>(e) || is_a<mul>(e) ) {
return e.map(*this);
}
else {
lst res;
- return lst();
+ return lst{};
}
}
ex vn = pp.collect(x).lcoeff(x);
ex vnlst;
if ( is_a<numeric>(vn) ) {
- vnlst = lst(vn);
+ vnlst = lst{vn};
}
else {
ex vnfactors = factor(vn);
// try Hensel lifting
ex res = hensel_multivar(pp, x, epv, prime, l, modfactors, C);
- if ( res != lst() ) {
+ if ( res != lst{} ) {
ex result = cont * unit;
for ( size_t i=0; i<res.nops(); ++i ) {
result *= res.op(i).content(x) * res.op(i).unit(x);
*/
struct find_symbols_map : public map_function {
exset syms;
- ex operator()(const ex& e)
+ ex operator()(const ex& e) override
{
if ( is_a<symbol>(e) ) {
syms.insert(e);
struct apply_factor_map : public map_function {
unsigned options;
apply_factor_map(unsigned options_) : options(options_) { }
- ex operator()(const ex& e)
+ ex operator()(const ex& e) override
{
if ( e.info(info_flags::polynomial) ) {
return factor(e, options);