Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
AbstractRing< T >::MultiplicativeGroupT Class Reference
Inheritance diagram for AbstractRing< T >::MultiplicativeGroupT:
[legend]
Collaboration diagram for AbstractRing< T >::MultiplicativeGroupT:
[legend]

Public Member Functions

const AbstractRing< T > & GetRing () const
 
bool Equal (const Element &a, const Element &b) const
 Compare two elements for equality. More...
 
const ElementIdentity () const
 Provides the Identity element. More...
 
const ElementAdd (const Element &a, const Element &b) const
 Adds elements in the group. More...
 
ElementAccumulate (Element &a, const Element &b) const
 TODO. More...
 
const ElementInverse (const Element &a) const
 Inverts the element in the group. More...
 
const ElementSubtract (const Element &a, const Element &b) const
 Subtracts elements in the group. More...
 
ElementReduce (Element &a, const Element &b) const
 Reduces an element in the congruence class. More...
 
const ElementDouble (const Element &a) const
 Doubles an element in the group. More...
 
Element ScalarMultiply (const Element &a, const Integer &e) const
 Performs a scalar multiplication. More...
 
Element CascadeScalarMultiply (const Element &x, const Integer &e1, const Element &y, const Integer &e2) const
 TODO. More...
 
void SimultaneousMultiply (Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const
 Multiplies a base to multiple exponents in a group. More...
 
- Public Member Functions inherited from AbstractGroup< T >
virtual ~AbstractGroup ()
 
virtual bool InversionIsFast () const
 Determine if inversion is fast. More...
 

Public Attributes

const AbstractRing< T > * m_pRing
 

Additional Inherited Members

- Public Types inherited from AbstractGroup< T >
typedef T Element
 

Detailed Description

template<class T>
class AbstractRing< T >::MultiplicativeGroupT

Definition at line 198 of file algebra.h.

Member Function Documentation

template<class T>
Element& AbstractRing< T >::MultiplicativeGroupT::Accumulate ( Element a,
const Element b 
) const
inlinevirtual

TODO.

Parameters
afirst element
bsecond element
Returns
TODO

Reimplemented from AbstractGroup< T >.

Definition at line 213 of file algebra.h.

template<class T>
const Element& AbstractRing< T >::MultiplicativeGroupT::Add ( const Element a,
const Element b 
) const
inlinevirtual

Adds elements in the group.

Parameters
afirst element
bsecond element
Returns
the sum of a and b

Implements AbstractGroup< T >.

Definition at line 210 of file algebra.h.

template<class T>
Element AbstractRing< T >::MultiplicativeGroupT::CascadeScalarMultiply ( const Element x,
const Integer e1,
const Element y,
const Integer e2 
) const
inlinevirtual

TODO.

Parameters
xfirst multiplicand
e1the first multiplier
ysecond multiplicand
e2the second multiplier
Returns
TODO

Reimplemented from AbstractGroup< T >.

Definition at line 231 of file algebra.h.

template<class T>
const Element& AbstractRing< T >::MultiplicativeGroupT::Double ( const Element a) const
inlinevirtual

Doubles an element in the group.

Parameters
athe element
Returns
the element doubled

Reimplemented from AbstractGroup< T >.

Definition at line 225 of file algebra.h.

template<class T>
bool AbstractRing< T >::MultiplicativeGroupT::Equal ( const Element a,
const Element b 
) const
inlinevirtual

Compare two elements for equality.

Parameters
afirst element
bsecond element
Returns
true if the elements are equal, false otherwise

Equal() tests the elements for equality using a==b

Implements AbstractGroup< T >.

Definition at line 204 of file algebra.h.

template<class T>
const AbstractRing<T>& AbstractRing< T >::MultiplicativeGroupT::GetRing ( ) const
inline

Definition at line 201 of file algebra.h.

template<class T>
const Element& AbstractRing< T >::MultiplicativeGroupT::Identity ( ) const
inlinevirtual

Provides the Identity element.

Returns
the Identity element

Implements AbstractGroup< T >.

Definition at line 207 of file algebra.h.

template<class T>
const Element& AbstractRing< T >::MultiplicativeGroupT::Inverse ( const Element a) const
inlinevirtual

Inverts the element in the group.

Parameters
afirst element
Returns
the inverse of the element

Implements AbstractGroup< T >.

Definition at line 216 of file algebra.h.

template<class T>
Element& AbstractRing< T >::MultiplicativeGroupT::Reduce ( Element a,
const Element b 
) const
inlinevirtual

Reduces an element in the congruence class.

Parameters
aelement to reduce
bthe congruence class
Returns
the reduced element

Reimplemented from AbstractGroup< T >.

Definition at line 222 of file algebra.h.

template<class T>
Element AbstractRing< T >::MultiplicativeGroupT::ScalarMultiply ( const Element a,
const Integer e 
) const
inlinevirtual

Performs a scalar multiplication.

Parameters
amultiplicand
emultiplier
Returns
the product

Reimplemented from AbstractGroup< T >.

Definition at line 228 of file algebra.h.

template<class T>
void AbstractRing< T >::MultiplicativeGroupT::SimultaneousMultiply ( Element results,
const Element base,
const Integer exponents,
unsigned int  exponentsCount 
) const
inlinevirtual

Multiplies a base to multiple exponents in a group.

Parameters
resultsan array of Elements
basethe base to raise to the exponents
exponentsan array of exponents
exponentsCountthe number of exponents in the array

SimultaneousMultiply() multiplies the base to each exponent in the exponents array and stores the result at the respective position in the results array.

SimultaneousMultiply() must be implemented in a derived class.

Precondition
COUNTOF(results) == exponentsCount
COUNTOF(exponents) == exponentsCount

Reimplemented from AbstractGroup< T >.

Definition at line 234 of file algebra.h.

template<class T>
const Element& AbstractRing< T >::MultiplicativeGroupT::Subtract ( const Element a,
const Element b 
) const
inlinevirtual

Subtracts elements in the group.

Parameters
afirst element
bsecond element
Returns
the difference of a and b. The element a must provide a Subtract member function.

Reimplemented from AbstractGroup< T >.

Definition at line 219 of file algebra.h.

Member Data Documentation

template<class T>
const AbstractRing<T>* AbstractRing< T >::MultiplicativeGroupT::m_pRing

Definition at line 237 of file algebra.h.


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