MCPcopy Create free account
hub / github.com/Singular/Singular / toString

Method toString

gfanlib/gfanlib_polyhedralfan.cpp:505–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505std::string PolyhedralFan::toString(int flags)const
506//void PolyhedralFan::printWithIndices(class Printer *p, bool printMultiplicities, SymmetryGroup *sym, bool group, bool ignoreCones, bool xml, bool tPlaneSort, vector<string> const *comments)const
507{
508 stringstream ret;
509
510 for(PolyhedralConeList::const_iterator i=cones.begin();i!=cones.end();i++)
511 {
512 ret<<"Cone\n"<<endl;
513 ret<<*i;
514 } return ret.str();
515#if 0
516 PolymakeFile polymakeFile;
517 polymakeFile.create("NONAME","PolyhedralFan","PolyhedralFan",flags&FPF_xml);
518
519// if(!sym)sym=&symm;
520
521 if(cones.empty())
522 {
523// p->printString("Polyhedral fan is empty. Printing not supported.\n");
524 ret<<"Polyhedral fan is empty. Printing not supported.\n";
525 return ret.str();
526 }
527
528 int h=cones.begin()->dimensionOfLinealitySpace();
529
530// log1 fprintf(Stderr,"Computing rays.\n");
531 ZMatrix rays=getRaysInPrintingOrder();
532
533 SymmetricComplex symCom(rays,cones.begin()->generatorsOfLinealitySpace(),symmetries);
534
535 polymakeFile.writeCardinalProperty("AMBIENT_DIM",n);
536 polymakeFile.writeCardinalProperty("DIM",getMaxDimension());
537 polymakeFile.writeCardinalProperty("LINEALITY_DIM",h);
538 polymakeFile.writeMatrixProperty("RAYS",rays,true,comments);
539 polymakeFile.writeCardinalProperty("N_RAYS",rays.size());
540 IntegerVectorList linealitySpaceGenerators=highestDimensionalCone().linealitySpace().dualCone().getEquations();
541 polymakeFile.writeMatrixProperty("LINEALITY_SPACE",rowsToIntegerMatrix(linealitySpaceGenerators,n));
542 polymakeFile.writeMatrixProperty("ORTH_LINEALITY_SPACE",rowsToIntegerMatrix(highestDimensionalCone().linealitySpace().getEquations(),n));
543
544 if(flags & FPF_primitiveRays)
545 {
546 ZMatrix primitiveRays;
547 for(IntegerVectorList::const_iterator i=rays.begin();i!=rays.end();i++)
548 for(PolyhedralConeList::const_iterator j=cones.begin();j!=cones.end();j++)
549 if(j->contains(*i)&&(j->dimensionOfLinealitySpace()+1==j->dimension()))
550 primitiveRays.push_back(j->semiGroupGeneratorOfRay());
551
552 polymakeFile.writeMatrixProperty("PRIMITIVE_RAYS",rowsToIntegerMatrix(primitiveRays,n));
553 }
554
555
556 ZMatrix generatorsOfLinealitySpace=cones.begin()->generatorsOfLinealitySpace();
557
558 log1 fprintf(Stderr,"Building symmetric complex.\n");
559 for(PolyhedralConeList::const_iterator i=cones.begin();i!=cones.end();i++)
560 {
561 {
562 static int t;

Callers 1

renamingStringsMethod · 0.45

Calls 15

IntegerClass · 0.85
emptyMethod · 0.80
writeCardinalPropertyMethod · 0.80
writeMatrixPropertyMethod · 0.80
getEquationsMethod · 0.80
dualConeMethod · 0.80
linealitySpaceMethod · 0.80
dimensionMethod · 0.80
remapMethod · 0.80

Tested by

no test coverage detected