resultant.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002     
00003     resultant.hpp -- Routines for computing resultants and subresultant
00004         chains. Silvester matrix.
00005 
00006     This file is a part of the Arageli library.
00007 
00008     Copyright (C) Nikolai Yu. Zolotykh, 1999--2006
00009     Copyright (C) Sergey S. Lyalin, 2005--2006
00010 
00011 *****************************************************************************/
00012 
00026 #ifndef _ARAGELI_resultant_hpp_
00027 #define _ARAGELI_resultant_hpp_
00028 
00029 #include "config.hpp"
00030 
00031 #include "polyalg.hpp"
00032 #include "matrix.hpp"
00033 
00034 
00035 namespace Arageli
00036 {
00037 
00038 
00040 
00043 template <typename P1, typename P2, typename M>
00044 M& sylvester_fill (const P1& p1, const P2& p2, M& res);
00045 
00046 
00048 
00052 template <typename P1, typename P2, typename M, typename MTFactory>
00053 M& sylvester (const P1& p1, const P2& p2, M& res, MTFactory fctr);
00054 
00055 
00057 template <typename P1, typename P2, typename M>
00058 inline M& sylvester (const P1& p1, const P2& p2, M& res)
00059 { return sylvester(p1, p2, res, factory<typename M::element_type>()); }
00060 
00061 
00063 template <typename P1, typename P2>
00064 inline matrix<typename P1::coef_type> sylvester
00065 (const P1& p1, const P2& p2)
00066 {
00067     // WARNING! Need to choose from P1::coef_type and P2::coef_type
00068     // as a type for the result matrix elements.
00069 
00070     matrix<typename P1::coef_type> res;
00071     return sylvester(p1, p2, res);
00072 }
00073 
00074 
00076 
00080 template <typename P1, typename P2, typename SRChain, typename PCFactory>
00081 void subresultants_nonmodular
00082 (const P1& p1, const P2& p2, SRChain& s, PCFactory fctr);
00083 
00084 
00086 
00087 template <typename P1, typename P2, typename SRChain>
00088 inline void subresultants_nonmodular
00089 (const P1& p1, const P2& p2, SRChain& s)
00090 {
00091     // WARNING! Need to choose from P1::coef_type and P2::coef_type
00092     // insted just P1::coef_type as a type passed to construct the factory.
00093 
00094     subresultants_nonmodular(p1, p2, s, factory<typename P1::coef_type>());
00095 }
00096 
00098 
00100 template <typename P1, typename P2, typename PCFactory>
00101 typename P1::coef_type resultant_nonmodular
00102 (const P1& p1, const P2& p2, PCFactory fctr);
00103 
00104 
00106 
00107 template <typename P1, typename P2>
00108 inline typename P1::coef_type resultant_nonmodular
00109 (const P1& p1, const P2& p2)
00110 {
00111     // WARNING! Need to choose from P1::coef_type and P2::coef_type
00112     // insted just P1::coef_type as a type of the return value.
00113 
00114     return resultant_nonmodular(p1, p2, factory<typename P1::coef_type>());
00115 }
00116 
00117 
00119 template <typename P1, typename P2, typename PCFactory>
00120 inline typename P1::coef_type resultant
00121 (const P1& p1, const P2& p2, PCFactory fctr)
00122 {
00123     // WARNING! Need to choose from P1::coef_type and P2::coef_type
00124     // insted just P1::coef_type as a type of the return value.
00125 
00126     return resultant_nonmodular(p1, p2, fctr);
00127 }
00128 
00130 template <typename P1, typename P2>
00131 inline typename P1::coef_type resultant
00132 (const P1& p1, const P2& p2)
00133 {
00134     // WARNING! Need to choose from P1::coef_type and P2::coef_type
00135     // insted just P1::coef_type as a type of the return value and
00136     // type of factory.
00137 
00138     return resultant(p1, p2, factory<typename P1::coef_type>());
00139 }
00140 
00141 
00142 } // namesapce Arageli
00143 
00144 
00145 #ifdef ARAGELI_INCLUDE_CPP_WITH_EXPORT_TEMPLATE
00146     #define ARAGELI_INCLUDE_CPP_WITH_EXPORT_TEMPLATE_resultant
00147     #include "resultant.cpp"
00148     #undef  ARAGELI_INCLUDE_CPP_WITH_EXPORT_TEMPLATE_resultant
00149 #endif
00150 
00151 #endif  // #ifndef _ARAGELI_resultant_hpp_

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