| 53 | |
| 54 | |
| 55 | void SymmetricComplex::Cone::remap(SymmetricComplex &complex) |
| 56 | { |
| 57 | ZMatrix const &vertices=complex.getVertices(); |
| 58 | ZVector sum(vertices.getWidth()); |
| 59 | for(unsigned i=0;i<indices.size();i++) |
| 60 | sum+=vertices[indices[i]]; |
| 61 | |
| 62 | unsigned n=sum.size(); |
| 63 | Permutation const &bestPermutation=sortKeyPermutation; |
| 64 | |
| 65 | assert(bestPermutation.size()==n); |
| 66 | |
| 67 | IntVector indicesNew(indices.size()); |
| 68 | int I=0; |
| 69 | for(unsigned i=0;i<indices.size();i++,I++) |
| 70 | { |
| 71 | ZVector ny=bestPermutation.apply(complex.vertices[indices[i]]); |
| 72 | std::map<ZVector,int>::const_iterator it=complex.indexMap.find(ny); |
| 73 | assert(it!=complex.indexMap.end()); |
| 74 | indicesNew[I]=it->second; |
| 75 | } |
| 76 | indices=indicesNew; |
| 77 | } |
| 78 | |
| 79 | |
| 80 | std::set<int> SymmetricComplex::Cone::indexSet()const |