1 #ifndef ALREADY_matmul3
2 #define ALREADY_matmul3
4 template<
typename typMk>
5 int indice(
const typename typMk::value_type & m,
const typMk &stockmon)
8 for(
typename typMk::const_iterator iter=stockmon.begin();
9 (iter->rep!=m.rep)&&(iter!=stockmon.end());iter++,res++);
14 template<
typename Base,
typename typstock,
typename typdump>
19 typedef typename typstock::value_type
mon;
24 current.push_back(
mon(1));
25 stockmon.push_back(
mon(1));
27 typename typdump::const_iterator iter;
28 for(iter=dump.begin();
29 iter!=dump.end();iter++);
35 for(
int i=0;
i<maxdeg;
i++)
37 list<mon> tmpcurrent=current;
39 current.erase(current.begin(),current.end());
42 for(
typename list<mon>::iterator iter=tmpcurrent.begin();
43 iter!=tmpcurrent.end();iter++)
44 current.push_back((*iter)*mon(
i,1));
47 for(
typename list<mon>::iterator iter=current.begin();iter!=current.end();iter++)
50 stockmon.push_back(*iter);
54 current.erase(iter--);
63 template<
typename typmat,
typename typdump,
typename Base,
typename typstock,
65 void matmul(typmat & m,
const int p,
const typdump &dump,
const Base &b
68 typedef typename typdump::value_type::pol_t
pol;
72 typedef typename typstock::value_type monstock;
76 for(
typename typstock::iterator iter=current.begin();iter!=current.end()
84 m=typmat(current.size(),current.size());
85 for(
typename typstock::iterator iter=current.begin()
86 ;iter!=current.end();iter++,j++)
94 typename typstock::value_type tmpmon;
96 for(
int i=0;
i<tmp.sizenf;
i++)
99 for(
int jj=0;jj<8;jj++)
100 if((tmp.nfind[
i]>>jj)&1)
103 m(
indice(tmpmon,stockmon),j,tmp.
nf[count++]*(coeff)(-1));
110 m(
indice(*iter,stockmon),j,(coeff)(1));
116 #endif //ALREADY_matmul3
void int2mon(const int &i, mon &res)
Definition: placemon3.hpp:664
int indice(const typename typMk::value_type &m, const typMk &stockmon)
Definition: matmul3sdp.hpp:5
void findcorresppol(const mon &m, const typdump &dump, pol &res)
Definition: corealgo.hpp:2031
int member(const typMk &tmpMk, const typename typMk::value_type mon)
Definition: corealgo.hpp:1391
T coeff_t
Definition: pol.hpp:9
int nbvar()
Definition: types.hpp:37
MSKconetypee MSKrealt MSKint32t MSKint32t j
Definition: mosek.h:2421
void matmul(typmat &m, const int p, const typdump &dump, const Base &b, const typstock &stockmon, monomial_server &serv)
Definition: matmul3sdp.hpp:65
MSKint32t k
Definition: mosek.h:2713
Definition: placemon3.hpp:14
int IsinB(const mon &m, const Base &b)
Definition: IsinB3.hpp:68
Mon mon
Definition: solver_bb_floating.cpp:136
MSKint32t MSKint32t MSKint32t i
Definition: mosek.h:2278
#define pol
Definition: pol2ter.hpp:3
Multivariate monomials.
Definition: Monom.hpp:21
T * nf
Definition: pol.hpp:12
void computestockmon(typstock &stockmon, const Base &b, const typdump &dump)
Definition: matmul3sdp.hpp:15