euclidean Struct Reference

#include <subresultant.hpp>

List of all members.

Static Public Member Functions


Detailed Description

Definition at line 7 of file subresultant.hpp.


Member Function Documentation

static Polynomial pquo ( const Polynomial &  a,
const Polynomial &  b 
) [inline, static]

Definition at line 40 of file subresultant.hpp.

References Polynomial, and euclidean::pseudo_div().

00041   {
00042     Polynomial r=a, q;
00043     pseudo_div(q, r, b);
00044     return q;
00045   }

static Polynomial prem ( const Polynomial &  a,
const Polynomial &  b 
) [inline, static]

Definition at line 32 of file subresultant.hpp.

References Polynomial, and euclidean::pseudo_div().

00033   {
00034     Polynomial r=a,q;
00035     pseudo_div(q, r, b);
00036     return r;
00037   }

static void pseudo_div ( R &  q,
R &  a,
const R &  b 
) [inline, static]

Definition at line 11 of file subresultant.hpp.

References mmx::degree(), mmx::pow(), R, and mmx::shift().

Referenced by euclidean::pquo(), and euclidean::prem().

00012   {
00013     typedef typename R::iterator iterator;
00014     R t;//(degree(b)+1, AsSize());
00015     typename R::value_type lb=b[degree(b)];
00016     q=R(0);
00017     int c=0, da = degree(a), db = degree(b), dab =da-db+1;
00018     while (da>=db) {
00019       R m(a[da],da-db);
00020       shift(t,b,da-db); t*=a[da];   // t=b*m;
00021       c++;
00022       a*=lb;
00023       t[da]=a[da];
00024       a-=t;
00025       q+=m;
00026       da=degree(a);
00027     }
00028     a *= pow(lb, dab-c);
00029   }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for realroot by  doxygen 1.6.1