source: git/libpolys/coeffs/AEp.h @ 52e6ef

spielwiese
Last change on this file since 52e6ef was 52e6ef, checked in by Hans Schoenemann <hannes@…>, 8 years ago
chg: use misc/auxiliary.h in libpolys and kernel/mod2.h in Singular for config
  • Property mode set to 100644
File size: 3.6 KB
Line 
1#ifndef AEP_H
2#define AEP_H
3
4#include <singularconfig.h>
5#include "si_gmp.h"
6
7#ifdef SINGULAR_4_1
8
9class p_poly // Klasse von p_polynomen mit Typ (Grad, Koeffizienten ganzzahlig)
10{
11
12public:
13    // Charakteristika der p_polynome (TO DO??: Dynamisches Array)
14
15    int deg;                // Grad des p_polynoms
16    int mod;                // Primzahl (Modul??)
17    mpz_t coef[100];        // Feld der Koeffizienten
18    //mpz_t coef = reinterpret_cast<mpz_t*> (omAlloc(100*sizeof(mpz_t)));
19
20
21    // Konstruktoren und Destruktoren
22    p_poly();
23    p_poly( int ,int, mpz_t*);
24    //p_poly(int_poly,int);
25    //~p_poly();
26
27    //Reduktion modulo p
28    void p_poly_reduce(p_poly, int);
29
30    // Arithmetische Operationen
31
32
33    // Additionen
34
35    void p_poly_add(const p_poly , const p_poly );
36    void p_poly_add_to(const p_poly);
37    void p_poly_add_mon(const p_poly,mpz_t, int); //addiert Monome zu p_polynom
38    void p_poly_add_mon_to(mpz_t,int);
39    void p_poly_add_const( p_poly, const mpz_t);
40    void p_poly_add_const_to(const mpz_t);
41
42    // Subtraktion
43
44    void p_poly_sub(const p_poly , const p_poly );
45    void p_poly_sub_to(const p_poly);
46    void p_poly_sub_mon(const p_poly,mpz_t,int);
47    void p_poly_sub_mon_to(mpz_t,int);
48    void p_poly_sub_const( p_poly, const mpz_t);
49    void p_poly_sub_const_to(const mpz_t);
50
51    //Multiplikationen
52
53    void p_poly_mult_n(p_poly,p_poly);
54    void p_poly_mult_n_to(const p_poly);
55    void p_poly_mult_ka( p_poly, p_poly);
56    void p_poly_scalar_mult(const mpz_t ,const p_poly);
57    void p_poly_scalar_mult(const p_poly, const mpz_t);
58    void p_poly_scalar_mult_to(const mpz_t);
59    void p_poly_neg();
60    void p_poly_mon_mult( p_poly, const int);
61    void p_poly_mon_mult_to(const int);
62
63    //Divisionen
64    void p_poly_div(p_poly&, p_poly&, p_poly,  p_poly); // exakte Division
65    void p_poly_div_to(p_poly&, p_poly&, p_poly);       // To Variante exakte Division
66    void p_poly_scalar_div(const p_poly, const mpz_t n); // Multipliziert konstante an Polynom
67    void p_poly_scalar_div_to(const mpz_t n);
68    void p_poly_div_rem( p_poly, p_poly);//Division mit Rest
69    void p_poly_div_rem_to( p_poly);
70    void p_poly_mon_div(const p_poly, const int); //Division durch MOnom
71    void p_poly_mon_div_rem(const p_poly, const int);
72
73    //Kombinationen
74
75    void p_poly_multadd_to(const p_poly, const p_poly); //a=a*b+c
76    void p_poly_multsub_to(const p_poly,const p_poly);  //a=a*b-c
77    //p_poly p_poly_addmult_to(const p_poly, const p_poly);
78
79
80
81
82    // Sonstige Operationen
83    void p_poly_set(const p_poly);
84    void p_poly_set(const mpz_t,int);                // Setzt p_polynom auf Konstante
85    void p_poly_set_zero();                        // Setzt p_polynom auf 0
86    void p_poly_horner(mpz_t, const mpz_t);        // Wertet p_polynom mittels Horner-Schema an einer Stelle aus
87    void p_poly_horner_p_poly(p_poly, p_poly);        //Setzt p_polynom in p_polynom mittels Horner Schema ein
88    void p_poly_gcd(p_poly,p_poly);                //Standard GGT
89    void p_poly_extgcd(p_poly &,p_poly &,p_poly &, p_poly, p_poly);        //Erweiterter Standard GGT
90    int is_equal(const p_poly) const;                // Test auf Gleichheit
91    int is_zero() const;                                // Test auf Gleichheit mit 0
92    int is_one() const;                                // Test auf Gleichheit mit 1
93    int is_monic() const;                                // testet, ob das p_polynom normiert ist
94
95    // Ein und Ausgabe
96    void p_poly_insert();                        // Eingabe von p_polynom
97    void p_poly_print();                        //Ausgabe von p_polynom
98};
99
100#endif
101#endif
102
103
Note: See TracBrowser for help on using the repository browser.