| 514 | |
| 515 | |
| 516 | std::string SymmetricComplex::toString(int flags)const |
| 517 | { |
| 518 | PolymakeFile polymakeFile; |
| 519 | polymakeFile.create("NONAME","PolyhedralFan","PolyhedralFan",flags&FPF_xml); |
| 520 | |
| 521 | |
| 522 | |
| 523 | |
| 524 | |
| 525 | polymakeFile.writeCardinalProperty("AMBIENT_DIM",n); |
| 526 | polymakeFile.writeCardinalProperty("DIM",getMaxDim()); |
| 527 | polymakeFile.writeCardinalProperty("LINEALITY_DIM",linealitySpace.getHeight()); |
| 528 | // polymakeFile.writeMatrixProperty("RAYS",rays,true,comments); |
| 529 | polymakeFile.writeMatrixProperty("RAYS",vertices,true); |
| 530 | polymakeFile.writeCardinalProperty("N_RAYS",vertices.getHeight()); |
| 531 | |
| 532 | |
| 533 | polymakeFile.writeMatrixProperty("LINEALITY_SPACE",linealitySpace,n); |
| 534 | polymakeFile.writeMatrixProperty("ORTH_LINEALITY_SPACE",kernel(linealitySpace),n); |
| 535 | |
| 536 | /* |
| 537 | if(flags & FPF_primitiveRays) |
| 538 | { |
| 539 | ZMatrix primitiveRays; |
| 540 | for(int i=0;i<rays.getHeight();i++) |
| 541 | for(PolyhedralConeList::const_iterator j=cones.begin();j!=cones.end();j++) |
| 542 | if(j->contains(*i)&&(j->dimensionOfLinealitySpace()+1==j->dimension())) |
| 543 | primitiveRays.push_back(j->semiGroupGeneratorOfRay()); |
| 544 | |
| 545 | polymakeFile.writeMatrixProperty("PRIMITIVE_RAYS",rowsToIntegerMatrix(primitiveRays,n)); |
| 546 | } |
| 547 | */ |
| 548 | #if 0 |
| 549 | ZMatrix generatorsOfLinealitySpace=cones.begin()->generatorsOfLinealitySpace(); |
| 550 | |
| 551 | log1 fprintf(Stderr,"Building symmetric complex.\n"); |
| 552 | for(PolyhedralConeList::const_iterator i=cones.begin();i!=cones.end();i++) |
| 553 | { |
| 554 | { |
| 555 | static int t; |
| 556 | // log1 fprintf(Stderr,"Adding faces of cone %i\n",t++); |
| 557 | } |
| 558 | // log2 fprintf(Stderr,"Dim: %i\n",i->dimension()); |
| 559 | |
| 560 | addFacesToSymmetricComplex(symCom,*i,i->getHalfSpaces(),generatorsOfLinealitySpace); |
| 561 | } |
| 562 | |
| 563 | // log1 cerr<<"Remapping"; |
| 564 | symCom.remap(); |
| 565 | // log1 cerr<<"Done remapping"; |
| 566 | |
| 567 | |
| 568 | PolyhedralFan f=*this; |
| 569 | #endif |
| 570 | |
| 571 | // log1 fprintf(Stderr,"Computing f-vector.\n"); |
| 572 | ZVector fvector=this->fvector(); |
| 573 | polymakeFile.writeCardinalVectorProperty("F_VECTOR",fvector); |
nothing calls this directly
no test coverage detected