#include <algebra.hpp>
Inheritance diagram for TaoCrypt::AbstractEuclideanDomain:


Public Types | |
| typedef Integer | Element |
Public Member Functions | |
| virtual void | DivisionAlgorithm (Element &r, Element &q, const Element &a, const Element &d) const =0 |
| virtual const Element & | Mod (const Element &a, const Element &b) const =0 |
| virtual const Element & | Gcd (const Element &a, const Element &b) const |
Protected Attributes | |
| Element | result |
Definition at line 150 of file algebra.hpp.
Reimplemented from TaoCrypt::AbstractRing.
Reimplemented in TaoCrypt::EuclideanDomainOf.
Definition at line 154 of file algebra.hpp.
| virtual void TaoCrypt::AbstractEuclideanDomain::DivisionAlgorithm | ( | Element & | r, | |
| Element & | q, | |||
| const Element & | a, | |||
| const Element & | d | |||
| ) | const [pure virtual] |
Implemented in TaoCrypt::EuclideanDomainOf.
Referenced by Mod().
Here is the caller graph for this function:

| const Integer & TaoCrypt::AbstractEuclideanDomain::Gcd | ( | const Element & | a, | |
| const Element & | b | |||
| ) | const [virtual] |
Definition at line 82 of file algebra.cpp.
References TaoCrypt::AbstractGroup::Equal(), Mod(), and result.
00084 { 00085 mySTL::vector<Element> g(3); 00086 g[0]= b; 00087 g[1]= a; 00088 unsigned int i0=0, i1=1, i2=2; 00089 00090 while (!Equal(g[i1], this->Identity())) 00091 { 00092 g[i2] = Mod(g[i0], g[i1]); 00093 unsigned int t = i0; i0 = i1; i1 = i2; i2 = t; 00094 } 00095 00096 return result = g[i0]; 00097 }
Here is the call graph for this function:

| const Integer & TaoCrypt::AbstractEuclideanDomain::Mod | ( | const Element & | a, | |
| const Element & | b | |||
| ) | const [pure virtual] |
Implemented in TaoCrypt::EuclideanDomainOf.
Definition at line 74 of file algebra.cpp.
References DivisionAlgorithm(), and result.
Referenced by Gcd().
00076 { 00077 Element q; 00078 DivisionAlgorithm(result, q, a, b); 00079 return result; 00080 }
Here is the call graph for this function:

Here is the caller graph for this function:

Element TaoCrypt::AbstractEuclideanDomain::result [mutable, protected] |
1.4.7

