Go to the source code of this file.
int isdivisible | ( | const mon< typcoeff, numexp< X, d, T > > & | m1, | |
const mon< typcoeff, numexp< X, d, T > > & | m2, | |||
const Base & | b | |||
) | [inline] |
Definition at line 33 of file isdivisible.cc.
References Base< predicat >::nbvar().
00035 { 00036 static int initmask=0; 00037 const int nbvar=b.nbvar(); 00038 int res=1; 00039 T mask; 00040 00041 if(initmask==0) 00042 { 00043 for(int i=0;i<d;i++) initmask=(initmask<<1)+1; 00044 } 00045 mask=initmask; 00046 for(int i=0;i<nbvar;i++) 00047 { 00048 00049 if((m2.rep.ind&(mask))<(m1.rep.ind&(mask))) 00050 { res=0;break;}; 00051 mask=mask<<d; 00052 } 00053 return res; 00054 }
Definition at line 18 of file isdivisible.cc.
References Base< predicat >::nbvar().
00019 { 00020 const int nbvar=b.nbvar(); 00021 int res=1; 00022 for(int i=0;i<nbvar;i++) 00023 { 00024 //cout<<" isdivisble "<<m2.GetDegree(i)<<" "<<m1.GetDegree(i)<<endl; 00025 if(m2.GetDegree(i)<m1.GetDegree(i)) 00026 { res=0;break;}; 00027 } 00028 return res; 00029 }
Definition at line 5 of file isdivisible.cc.
Referenced by choice_fall(), compute_ppcm(), and NewCrochetchoix().