Changeset 32d8cb in git for gfanlib/gfanlib_symmetriccomplex.cpp
- Timestamp:
- Oct 25, 2013, 8:34:39 PM (10 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 9cf75aab8ce4766fcf49c2135012db6957300a95
- Parents:
- 6a6ae29f7bcf2272aa28c90bb17f8e9a0337de6e62de8de7d677c1aa9a6da3c0e58b04a58a9a884b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gfanlib/gfanlib_symmetriccomplex.cpp
r6a6ae2 r32d8cb 15 15 16 16 SymmetricComplex::Cone::Cone(std::set<int> const &indices_, int dimension_, Integer multiplicity_, bool sortWithSymmetry, SymmetricComplex const &complex): 17 isKnownToBeNonMaximalFlag(false), 17 18 dimension(dimension_), 18 19 multiplicity(multiplicity_), 19 isKnownToBeNonMaximalFlag(false),20 20 sortKeyPermutation(complex.n) 21 21 { … … 27 27 ZMatrix const &vertices=complex.getVertices(); 28 28 ZVector sum(vertices.getWidth()); 29 for( inti=0;i<indices.size();i++)29 for(unsigned i=0;i<indices.size();i++) 30 30 sum+=vertices[indices[i]]; 31 31 … … 56 56 ZMatrix const &vertices=complex.getVertices(); 57 57 ZVector sum(vertices.getWidth()); 58 for( inti=0;i<indices.size();i++)58 for(unsigned i=0;i<indices.size();i++) 59 59 sum+=vertices[indices[i]]; 60 60 … … 62 62 Permutation const &bestPermutation=sortKeyPermutation; 63 63 64 assert( bestPermutation.size()==n);64 assert((int)bestPermutation.size()==n); 65 65 66 66 IntVector indicesNew(indices.size()); 67 67 int I=0; 68 for( inti=0;i<indices.size();i++,I++)68 for(unsigned i=0;i<indices.size();i++,I++) 69 69 { 70 70 ZVector ny=bestPermutation.apply(complex.vertices[indices[i]]); … … 80 80 { 81 81 std::set<int> ret; 82 for( inti=0;i<indices.size();i++)82 for(unsigned i=0;i<indices.size();i++) 83 83 ret.insert(indices[i]); 84 84 … … 89 89 { 90 90 int next=0; 91 for( inti=0;i<indices.size();i++)91 for(unsigned i=0;i<indices.size();i++) 92 92 { 93 93 while(1) 94 94 { 95 if(next>= c.indices.size())return false;95 if(next>=(int)c.indices.size())return false; 96 96 if(indices[i]==c.indices[next])break; 97 97 next++; … … 105 105 { 106 106 std::set<int> r; 107 for( inti=0;i<indices.size();i++)107 for(unsigned i=0;i<indices.size();i++) 108 108 { 109 109 ZVector ny=permutation.apply(complex.vertices[indices[i]]); … … 139 139 { 140 140 ZMatrix l; 141 for( inti=0;i<indices.size();i++)141 for(unsigned i=0;i<indices.size();i++) 142 142 l.appendRow(complex.vertices[indices[i]]); 143 143 … … 150 150 SymmetricComplex::SymmetricComplex(ZMatrix const &rays, ZMatrix const &linealitySpace_, SymmetryGroup const &sym_): 151 151 n(rays.getWidth()), 152 linealitySpace(canonicalizeSubspace(linealitySpace_)), 152 153 sym(sym_), 153 dimension(-1), 154 linealitySpace(canonicalizeSubspace(linealitySpace_)) 154 dimension(-1) 155 155 { 156 156 assert(rays.getWidth()==linealitySpace.getWidth()); … … 222 222 } 223 223 224 /* 224 #if 0 225 225 IntVector SymmetricComplex::dimensionsAtInfinity()const 226 226 { … … 228 228 dimension of the intersection of each cone in the complex with 229 229 the plane x_0=0 */ 230 /*231 230 IntVector ret(cones.size()); 232 231 … … 247 246 return ret; 248 247 } 249 */ 248 #endif 250 249 251 250 void SymmetricComplex::buildConeLists(bool onlyMaximal, bool compressed, std::vector<std::vector<IntVector > >*conelist/*, ZMatrix *multiplicities*/)const … … 259 258 int numberOfOrbitsOutput=0; 260 259 int numberOfOrbitsOfThisDimension=0; 261 bool newDimension=true;260 // bool newDimension=true; 262 261 { 263 262 int I=0; 264 263 for(ConeContainer::const_iterator i=cones.begin();i!=cones.end();i++,I++) 265 266 267 264 if(i->dimension==d) 265 { 266 numberOfOrbitsOfThisDimension++; 268 267 if(!onlyMaximal || isMaximal(*i)) 269 268 { 270 269 numberOfOrbitsOutput++; 271 bool isMax=isMaximal(*i);272 bool newOrbit=true;270 // bool isMax=isMaximal(*i); 271 // bool newOrbit=true; 273 272 std::set<std::set<int> > temp; 274 275 273 for(SymmetryGroup::ElementContainer::const_iterator k=sym.elements.begin();k!=sym.elements.end();k++) 274 { 276 275 Cone temp1=i->permuted(*k,*this,false); 277 276 temp.insert(temp1.indexSet()); … … 291 290 *multiplicities << std::endl; 292 291 }*/ 293 newOrbit=false;294 newDimension=false;292 // newOrbit=false; 293 // newDimension=false; 295 294 } 296 }297 298 } 299 } 300 301 } 302 303 std::string SymmetricComplex::toStringJustCones(int dimLow, int dimHigh, bool onlyMaximal, bool group, std::ostream *multiplicities, bool compressed, bool tPlaneSort)const295 } 296 } 297 } 298 } 299 300 } 301 302 std::string SymmetricComplex::toStringJustCones(int dimLow, int dimHigh, bool onlyMaximal, bool group, std::ostream *multiplicities, bool compressed, bool /*tPlaneSort*/)const 304 303 { 305 304 std::stringstream ret; … … 392 391 { 393 392 bool isBounded=true; 394 for( intj=0;j<i->indices.size();j++)393 for(unsigned j=0;j<i->indices.size();j++) 395 394 if(vertices[i->indices[j]][0].sign()==0)isBounded=false; 396 395 doAdd=isBounded; … … 692 691 { 693 692 ZMatrix generators(indices.size(),getAmbientDimension()); 694 for( inti=0;i<indices.size();i++)693 for(unsigned i=0;i<indices.size();i++) 695 694 generators[i]=vertices[indices[i]]; 696 695 return ZCone::givenByRays(generators,linealitySpace);
Note: See TracChangeset
for help on using the changeset viewer.