Changeset c4d065 in git for gfanlib/gfanlib_symmetry.cpp
 Timestamp:
 Nov 26, 2010, 4:37:58 PM (13 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
 Children:
 92e2cd1822dc1be6a8ef69173615a30e5bd67d0e
 Parents:
 9e7d85ecc0703de24759963ee74edd60d4139c09
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

gfanlib/gfanlib_symmetry.cpp
r9e7d85 rc4d065 212 212 } 213 213 214 IntMatrix SymmetryGroup::getGenerators()const 215 { 216 IntMatrix ret(0,this>sizeOfBaseSet()); 217 for(ElementContainer::const_iterator i=elements.begin();i!=elements.end();i++)ret.appendRow(i>toIntVector()); 218 return ret; 219 } 220 214 221 void SymmetryGroup::computeClosure(Permutation const &v) //does this work?? 215 222 { … … 220 227 while(!newOnes.empty()) 221 228 { 222 static int i;223 i++;224 225 229 Permutation v=*newOnes.begin(); 226 230 for(ElementContainer::const_iterator i=elements.begin();i!=elements.end();i++) … … 232 236 } 233 237 { 234 Permutation n=v.apply( *i);238 Permutation n=v.apply(v); 235 239 if(0==elements.count(n)) 236 240 newOnes.insert(n); … … 243 247 244 248 245 /* 246 247 void SymmetryGroup::computeClosure(IntegerVectorList const &l) 248 { 249 // for(IntegerVectorList::const_iterator i=l.begin();i!=l.end();i++) 250 // computeClosure(*i); 251 252 bool growing=true; 253 while(growing) 254 { 255 growing=false; 256 for(ElementContainer::const_iterator i=elements.begin();i!=elements.end();i++) 257 { 258 for(IntegerVectorList::const_iterator j=l.begin();j!=l.end();j++) 259 { 260 { 261 IntegerVector n(compose(*i,*j)); 262 growing=(0==elements.count(n)); 263 elements.insert(n); 264 } 265 { 266 IntegerVector n(compose(*i,*j)); 267 growing=(0==elements.count(n)); 268 elements.insert(n); 269 } 270 } 271 } 272 } 273 } 274 */ 249 void SymmetryGroup::computeClosure(IntMatrix const &l) 250 { 251 for(int i=0;i<l.getHeight();i++)computeClosure(Permutation(l[i])); 252 } 253 275 254 276 255 /*
Note: See TracChangeset
for help on using the changeset viewer.