where
iff the previous system has a solution in . This polynomial is called the resultant of on . Different constructions of resultants are presented hereafter.
template<class R,class L,class LM> R matrix_of(const L& l, char t='N'); template<class R,class L,class LM> R matrix_of(const L& l, const LM & lm, char t='N');
The use of such functions is done by specifying the output of matrices:
MAT m = matrix_of<MAT>(l);
MAT m = matrix_of<MAT>(l,'T');
l
is a list of multivariate polynomials, MAT
the type of output matrix that we want to compute, and 'T'
specifies if the transposed matrix is computed.MAT m = macaulay<MAT>(l);
MAT mt = macaulay<MAT>(l,'T');
l
is a list of multivariate polynomials in variables, MAT
the type of output matrix that we want to compute, and 'T'
specifies if the transposed matrix is computed or not.
synaps/mpol/Toric.h
synaps/mpol/bezoutian.h
#include <synaps/mpol.h> #include <synaps/mpol/macaulay.h> #include <synaps/mpol/bezoutian.h> #include <synaps/mpol/Toric.h> typedef MatrDse<double> matr_t; typedef MPol<double> mpol_t; using std::cout; using std::endl; int main () { mpol_t p0("t+x+2*y"), p1("x^2+y^2-1"), p2("y^2+x*y-1"); vector<mpol_t> l; l.push_back(p0); l.push_back(p1); l.push_back(p2); cout<< macaulay<matr_t>(l)<<endl;
cout<< m_bezout<matr_t>(l)<<endl;
cout<< toric<matr_t>(l)<<endl;
}