Main Page   Reference Manual   Compound List   File List  

libecc/fieldmath.h File Reference

Number theory functions. More...

#include <gmpxx.h>
#include <libecc/bitset.h>
Include dependency graph for fieldmath.h:

Go to the source code of this file.

Namespaces

namespace  libecc
 

Namespace for libecc.


Functions

template<class field_type , class square_functor >
field_type libecc::exponentiation (field_type const &base, mpz_class const &exponent, square_functor const &do_square=multiplicative_square< field_type >())
template<unsigned int m>
bitset< m > & libecc::gcd (bitset< m > &polynomial_coefficients0, bitset< m > &polynomial_coefficients1)

Detailed Description

Number theory functions.

This header file declares template functions for arbitrary fields. The field must have defined the following methods:

        field_type&       field_type::operator+=(field_type const&);
        field_type&       field_type::operator-=(field_type const&);
        field_type&       field_type::operator*=(field_type const&);
        field_type&       field_type::operator/=(field_type const&);
 static field_type const& field_type::unity(void) const;                        // Returns the multiplicative unity.
Copyright © 2002-2008 Carlo Wood.  All rights reserved.