2 template<
typename typcoeff>
3 int Iszero(
const UPolyDense<upar<typcoeff> > &
c)
5 UPolyDense<upar<typcoeff> > T(typcoeff(0));
9 template <
typename typmat>
12 typedef typename typmat::coeff_t C;
15 for(
unsigned int k=0;
k<M.ncol;
k++){
16 for(l=
k;(l<M.nrow) && (
Iszero(M(l,
k)));l++);
19 for(
unsigned int i=
k+1;
i<M.nrow;
i++){
21 for(
unsigned int j=M.ncol-1;
j>
k;
j--) {
32 template<
typename typmat,
typename typsec>
35 typedef typename typmat::coeff_t coeffmat;
37 for(
int i=mat.nrow;
i>0;
i++)
42 for(j=0;j<mat.ncol &&
Iszero(mat(
i,j));j++);
45 sec[
k]=sec[
k]*mat(
k,j);
50 sec[
k]-=sec[
i]*mat(
k,j);
53 template<
typename typmat,
typename typres,
typename typmon
54 ,
typename typdump,
typename Base>
55 void symbo(typres &res,
const list<typmat> &lmat,
const typmon &stockmon
56 ,
const typdump &dump,
const Base &b)
58 typedef typename typdump::value_type::pol_t mpoly;
59 typedef typename mpoly::coeff_t coeff;
60 vector<UPolyDense<upar<coeff> > > secmembre;
61 int coldim=lmat.front().nrow,rowdim=lmat.front().ncol;
62 harewell<UPolyDense<upar<coeff> > > combilin(coldim,rowdim)
64 for(
typename list<typmat>::const_iterator itercomb=lmat.begin()
65 ;itercomb!=lmat.end();itercomb++)
66 for(
int i=0;
i<combilin.nrow;
i++)
67 for(
int j=0;
j<combilin.ncol;
j++)
68 combilin(
i,
j,combilin(
i,
j)
69 +UPolyDense<upar<coeff> >(coeff(rand()%13)
70 *((*itercomb)(
i,
j)),0));
71 for(
int i=0;i<Xid.nrow;i++)
72 Xid(i,i)=UPolyDense<upar<coeff> >(
"X");
73 for(
int i=0;i<combilin.nrow;i++)
74 combilin(i,i,combilin(i,i)-Xid(i,i));
76 for(
int i=0;i<combilin.nrow-1;i++)
77 secmembre.push_back(combilin(i,combilin.ncol-1));
81 for(
int i=0;b.
nbvar();i++)
86 for(
typename typmon::const_iterator iter=stockmon.begin()
87 ;*iter!=
mon(i,1);j++,iter++);
90 res.push_back(secmembre[j]);
94 res.push_back(UPolyDense<upar<coeff> >(0,0));
void SolveUff(const typmat &mat, typsec &sec)
Definition: symbo.hpp:33
void findcorresppol(const mon &m, const typdump &dump, pol &res)
Definition: corealgo.hpp:2031
int nbvar()
Definition: types.hpp:37
void Triang(typmat &M)
Definition: symbo.hpp:10
MSKconetypee MSKrealt MSKint32t MSKint32t j
Definition: mosek.h:2421
MSKint32t k
Definition: mosek.h:2713
int Iszero(const UPolyDense< upar< typcoeff > > &c)
Definition: symbo.hpp:3
Mon mon
Definition: solver_bb_floating.cpp:136
MSKrealt * c
Definition: mosek.h:2678
MSKint32t MSKint32t MSKint32t i
Definition: mosek.h:2278
void symbo(typres &res, const list< typmat > &lmat, const typmon &stockmon, const typdump &dump, const Base &b)
Definition: symbo.hpp:55