intalg.hpp File Reference

#include "config.hpp"
#include <cmath>
#include "exception.hpp"
#include "type_traits.hpp"
#include "factory.hpp"
#include "cmp.hpp"
#include "gcd.hpp"
#include "powerest.hpp"
#include "std_import.hpp"
#include "intalg.cpp"

Go to the source code of this file.

Namespaces

namespace  Arageli
namespace  Arageli::_Internal
namespace  std

Jacobi symbol.

template<typename T, typename T_factory>
int Arageli::jacobi (T a, T n, const T_factory &tfctr)
 Computes the Jacobi symbol (a/n).
template<typename T>
int Arageli::jacobi (const T &a, const T &n)
 Computes the Jacobi symbol (a/n).

Specialization of std::sqrt for all integer type as Arageli::intsqrt.

char std::sqrt (char a)
unsigned char std::sqrt (unsigned char a)
signed char std::sqrt (signed char a)
unsigned short std::sqrt (unsigned short a)
signed short std::sqrt (signed short a)
unsigned int std::sqrt (unsigned int a)
signed int std::sqrt (signed int a)
unsigned long std::sqrt (unsigned long a)
signed long std::sqrt (signed long a)

Defines

#define ARAGELI_INCLUDE_CPP_WITH_EXPORT_TEMPLATE_INTALG

Functions

template<typename T, typename T_factory>
Arageli::inverse_mod (const T &a, const T &m, const T_factory &tfctr)
 Returns inversion of a modulo n.
template<typename T>
Arageli::inverse_mod (const T &a, const T &n)
 Returns inversion of a modulo n.
template<typename T, typename I, typename T_factory>
Arageli::power_mod (T a, I n, const T &m, const T_factory &tfctr)
 Exponentiates a in to power n modulo m via squaring and adding.
template<typename T, typename I>
Arageli::power_mod (const T &a, const I &n, const T &m)
 Exponentiates a in to power n modulo m via squaring and adding.
template<typename T>
Arageli::_Internal::conditioner (const T &a, const T &b, const T &N)
template<typename T, typename V>
Arageli::_Internal::conditioner (const T &_a, const T &_b, const T &N, V &d)
template<typename T1, typename T2, typename T3>
T3 Arageli::mod (const T1 &a, const T2 &b, const T3 &d)
template<typename T1, typename T2>
T2 Arageli::mod (const T1 &a, const T2 &b)
 Compute a modulo b.
template<typename T1, typename T2, typename T3>
T3 Arageli::div_mod (const T1 &a, const T2 &b, const T3 &d)
 Compute a/b modulo d.
template<typename T1, typename T2, typename T3>
T3 Arageli::rem_mod (const T1 &a, const T2 &b, const T3 &d)
 Compute residue of division a by b modulo d.
template<typename T1, typename T2>
T2 Arageli::ann (const T1 &a, const T2 &n)
 Compute n/gcd(a, n).
template<typename T1, typename T2, typename T3>
T3 Arageli::quo_mod (const T1 &a, const T2 &b, const T3 &d)
template<typename T>
Arageli::split (const T &a, const T &d)
template<typename T>
Arageli::stab (const T &a, const T &b, const T &N)
template<typename T>
Arageli::split_stab (const T &a, const T &b, const T &N)
template<typename T>
Arageli::unit (const T &a, const T &N)
template<typename T>
Arageli::stab (const T &a, const T &b, const T &N, const T &d)
template<typename T>
Arageli::split_stab (const T &a, const T &b, const T &N, const T &d)
template<typename T>
Arageli::split_mod (const T &a, const T &d)
template<typename T>
Arageli::stab_mod (const T &a, const T &b, const T &N)
template<typename T>
Arageli::stab_mod (const T &a, const T &b, const T &N, const T &d)
template<typename T>
bool Arageli::is_invertible_mod (const T &a, const T &N)
 Returns true iff a is invertible element modulo N.
template<typename T>
std::size_t Arageli::nbits (const T &a)
 Compute number of bit in binary notation of a.
template<typename T, typename T_factory>
std::size_t Arageli::nbits (T a, const T_factory &tfctr)
 Compute number of bit in binary notation of a.
template<typename T, typename T_factory>
Arageli::factorial_successive_multiplication (T a, const T_factory &tfctr)
 Computes factorial via just successive multiplication (by definition).
template<typename T>
Arageli::factorial_successive_multiplication (const T &a)
 Computes factorial via just successive multiplication (by definition).
template<typename T, typename T_factory>
Arageli::factorial_even_odd_multiplication (T a, const T_factory &tfctr)
 Computes factorial via even and odd multiplier separation.
template<typename T>
Arageli::factorial_even_odd_multiplication (const T &a)
 Computes factorial via even and odd multiplier separation.
template<typename T, typename T_factory>
Arageli::factorial (const T &a, const T_factory &tfctr)
 Computes factorial of a via apropriate algorithm.
template<typename T>
Arageli::factorial (const T &a)
 Computes factorial of a via apropriate algorithm.
template<typename T>
Arageli::intsqrt (const T &a)
 Integer square root of a.
template<typename T, typename TT>
Arageli::sqrt_mod_shenks (const T &a, const T &n, const TT &tt)
 The Shenks algorithm (square root of a modulo n, for n = 1 (mod 4)).
template<typename T>
Arageli::sqrt_mod_shenks (const T &a, const T &n)
 The Shenks algorithm (square root of a modulo n, for n = 1 (mod 4)).


Define Documentation

#define ARAGELI_INCLUDE_CPP_WITH_EXPORT_TEMPLATE_INTALG

Definition at line 347 of file intalg.hpp.


Generated on Thu Aug 31 17:38:17 2006 for Arageli by  doxygen 1.4.7