]> www.ginac.de Git - ginac.git/blobdiff - ginac/polynomial/euclid_gcd_wrap.h
Happy New Year!
[ginac.git] / ginac / polynomial / euclid_gcd_wrap.h
index d77f71c00a139b44439f5c3154361a104aa0f8e4..ac6c4526084837fec8376a4fddb7ec152375924e 100644 (file)
@@ -1,13 +1,39 @@
+/** @file euclid_gcd_wrap.h
+ *
+ *  Euclidean GCD and supporting functions. */
+
+/*
+ *  GiNaC Copyright (C) 1999-2019 Johannes Gutenberg University Mainz, Germany
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 #ifndef GINAC_PGCD_EUCLID_GCD_H
 #define GINAC_PGCD_EUCLID_GCD_H
-#include "upoly.hpp"
-#include "gcd_euclid.tcc"
+
+#include "upoly.h"
+#include "gcd_euclid.h"
 #include "smod_helpers.h"
-#include <ginac/ginac.h>
-#include "debug.hpp"
+#include "add.h"
+#include "ex.h"
+#include "operators.h"
+#include "power.h"
+#include "relational.h"
+#include "debug.h"
 
-namespace GiNaC
-{
+namespace GiNaC {
 
 static void ex2upoly(umodpoly& u, ex e, const ex& var, const long p)
 {
@@ -33,7 +59,7 @@ static ex umodpoly2ex(const umodpoly& a, const ex& var, const long p)
                const ex term = numeric(c)*power(var, i);
                ev.push_back(term);
        }
-       ex ret = (new add(ev))->setflag(status_flags::dynallocated);
+       ex ret = dynallocate<add>(ev);
        return ret;
 }
        
@@ -53,4 +79,4 @@ static ex euclid_gcd(ex A, ex B, const ex& var, const long p)
 
 } // namespace GiNaC
 
-#endif
+#endif // ndef GINAC_PGCD_EUCLID_GCD_H