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

Method writeIncidenceMatrixProperty

gfanlib/gfanlib_polymakefile.cpp:384–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382
383
384void PolymakeFile::writeIncidenceMatrixProperty(const char *p, const vector<list<int> > &m)
385{
386 stringstream t;
387
388 if(isXml)
389 {
390 t<<"<incidence_matrix>";
391 for(unsigned i=0;i<m.size();i++)
392 {
393 t<<"<set>";
394 list<int> temp=m[i];
395 temp.sort();
396 for(list<int>::const_iterator j=temp.begin();j!=temp.end();j++)
397 {
398 if(j!=temp.begin())t<<' ';
399 t<< *j;
400 }
401 t<<"</set>\n"<<endl;
402 }
403 t<<"</incidence_matrix>\n";
404 }
405 else
406 {
407 for(unsigned i=0;i<m.size();i++)
408 {
409 t<<'{';
410 list<int> temp=m[i];
411 temp.sort();
412 for(list<int>::const_iterator j=temp.begin();j!=temp.end();j++)
413 {
414 if(j!=temp.begin())t<<' ';
415 t<< *j;
416 }
417 t<<'}'<<endl;
418 }
419 }
420 writeProperty(p,t.str());
421}
422
423
424ZVector PolymakeFile::readCardinalVectorProperty(const char *p)

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.45
sortMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected