Changeset 8b1af6 in git for gfanlib/gfanlib_symmetry.cpp
- Timestamp:
- Nov 6, 2013, 2:30:52 PM (10 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 93fc820b11e13b03357f9d05061a1954e37d658c
- Parents:
- 75761633171290fa9ee90c7fc19a9d9bfba3534911ab4e8595e6e90a6b646949f46d516f88a72015
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gfanlib/gfanlib_symmetry.cpp
r11ab4e r8b1af6 25 25 TrieNode(IntVector const &v, int i) 26 26 { 27 if(i<v.size())27 if(i<(int)v.size()) 28 28 m[v[i]]=TrieNode(v,i+1); 29 29 } … … 31 31 { 32 32 int ret=0; 33 if(i== v.size())return 1;33 if(i==(int)v.size())return 1; 34 34 for(Map::const_iterator j=m.begin();j!=m.end();j++) 35 35 { … … 41 41 void search(ZVector const &v, ZVector &building, Permutation &tempPerm, Permutation &ret, ZVector &optimal, int i, bool &isImproving)const 42 42 { 43 if(i==v.size()){ret=tempPerm;optimal=building;isImproving=false;return;}43 if(i==(int)v.size()){ret=tempPerm;optimal=building;isImproving=false;return;} 44 44 if(isImproving) 45 45 building[i]=-0x7fffffff; … … 61 61 void searchStabalizer(ZVector const &v, ZVector &building, Permutation &tempPerm, Permutation &ret, ZVector &optimal, int i, bool &isImproving, ZVector const &toBeFixed)const 62 62 { 63 if(i==v.size())63 if(i==(int)v.size()) 64 64 if(!(tempPerm.apply(v)<optimal)) 65 65 { … … 102 102 void insert(Permutation const &v, int i) 103 103 { 104 if(i==v.size())return;104 if(i==(int)v.size())return; 105 105 if(m.count(v[i])) 106 106 m[v[i]].insert(v,i+1); … … 132 132 int n; 133 133 Trie(int n_): 134 n(n_),135 theTree(Permutation(n_),0)134 theTree(Permutation(n_),0), 135 n(n_) 136 136 { 137 137 } … … 276 276 IntVector ret(size()); 277 277 assert(size()==b.size()); 278 for( inti=0;i<size();i++)ret[i]=b[(*this)[i]];278 for(unsigned i=0;i<size();i++)ret[i]=b[(*this)[i]]; 279 279 return Permutation(ret); 280 280 } … … 284 284 IntVector ret(size()); 285 285 assert(size()==b.size()); 286 for( inti=0;i<size();i++)ret[(*this)[i]]=b[i];286 for(unsigned i=0;i<size();i++)ret[(*this)[i]]=b[i]; 287 287 return Permutation(ret); 288 288 } … … 292 292 IntVector ret(size()); 293 293 assert(size()==v.size()); 294 for( inti=0;i<size();i++)ret[i]=v[(*this)[i]];294 for(unsigned i=0;i<size();i++)ret[i]=v[(*this)[i]]; 295 295 return ret; 296 296 } … … 300 300 ZVector ret(size()); 301 301 assert(size()==v.size()); 302 for( inti=0;i<size();i++)ret[i]=v[(*this)[i]];302 for(unsigned i=0;i<size();i++)ret[i]=v[(*this)[i]]; 303 303 return ret; 304 304 } … … 309 309 ZVector ret(size()); 310 310 assert(size()==v.size()); 311 for( inti=0;i<size();i++)ret[(*this)[i]]=v[i];311 for(unsigned i=0;i<size();i++)ret[(*this)[i]]=v[i]; 312 312 return ret; 313 313 } … … 431 431 ZVector Permutation::fundamentalDomainInequality()const 432 432 { 433 for( inti=0;i<size();i++)434 if((*this)[i]!= i)433 for(unsigned i=0;i<size();i++) 434 if((*this)[i]!=(int)i) 435 435 return ZVector::standardVector(size(),i)-ZVector::standardVector(size(),(*this)[i]); 436 436 return ZVector(size());
Note: See TracChangeset
for help on using the changeset viewer.