algebramix_doc 0.3
/Users/mourrain/Devel/mmx/algebramix/include/algebramix/polynomial_modular_int.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : polynomial_modular_int.hpp
00004 * DESCRIPTION: Multiplying modular polynomials by lifting and reduction
00005 * COPYRIGHT  : (C) 2009  Gregoire Lecerf
00006 *******************************************************************************
00007 * This software falls under the GNU general public license and comes WITHOUT
00008 * ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
00009 * If you don't have this file, write to the Free Software Foundation, Inc.,
00010 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00011 ******************************************************************************/
00012 
00013 #ifndef __MMX_POLYNOMIAL_MODULAR_INT_HPP
00014 #define __MMX_POLYNOMIAL_MODULAR_INT_HPP
00015 #include <algebramix/polynomial.hpp>
00016 #include <algebramix/polynomial_balanced.hpp>
00017 #include <algebramix/polynomial_dicho.hpp>
00018 #include <algebramix/kronecker_modular_int.hpp>
00019 #include <algebramix/polynomial_kronecker.hpp>
00020 
00021 namespace mmx {
00022 
00023 /******************************************************************************
00024 * Use Kronecker multiplication by default for polynomials over modular integers
00025 ******************************************************************************/
00026 
00027 DEFINE_VARIANT (polynomial_modular_int,
00028                 polynomial_dicho<
00029                   polynomial_balanced<
00030                     polynomial_kronecker<
00031                       polynomial_naive> > >)
00032 
00033 #define DECLARE_HELPER(I)                                       \
00034   template<typename V, typename W>                              \
00035   struct polynomial_variant_helper<modular<modulus<I,V>,W> > {  \
00036     typedef polynomial_modular_int PV;                          \
00037   };
00038 
00039 DECLARE_HELPER(unsigned char)
00040 DECLARE_HELPER(signed char)
00041 DECLARE_HELPER(unsigned short int)
00042 DECLARE_HELPER(signed short int)
00043 DECLARE_HELPER(unsigned int)
00044 DECLARE_HELPER(int)
00045 DECLARE_HELPER(unsigned long int)
00046 DECLARE_HELPER(long int)
00047 DECLARE_HELPER(unsigned long long int)
00048 DECLARE_HELPER(long long int)
00049 #undef DECLARE_HELPER
00050 
00051 } // namespace mmx
00052 #endif // __MMX_POLYNOMIAL_MODULAR_INT_HPP
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines