| 357 | |
| 358 | |
| 359 | vector<list<int> > PolymakeFile::readMatrixIncidenceProperty(const char *p) |
| 360 | { |
| 361 | vector<list<int> > ret; |
| 362 | assert(hasProperty(p,true)); |
| 363 | list<PolymakeProperty>::iterator prop=findProperty(p); |
| 364 | stringstream s(prop->value); |
| 365 | |
| 366 | while((s.peek()!=-1)&&(s.peek()!='\n')&&(s.peek()!=0)) |
| 367 | { |
| 368 | // fprintf(Stderr,"!\n"); |
| 369 | int c=s.get(); |
| 370 | //fprintf(Stderr,"%i",c); |
| 371 | assert(c=='{'); |
| 372 | ret.push_back(readIntList(s)); |
| 373 | c=s.get(); |
| 374 | assert(c=='}'); |
| 375 | c=s.get(); |
| 376 | while(c==' ' || c=='\t')c=s.get(); |
| 377 | eatComment2(c,s); |
| 378 | assert(c=='\n'); |
| 379 | } |
| 380 | return ret; |
| 381 | } |
| 382 | |
| 383 | |
| 384 | void PolymakeFile::writeIncidenceMatrixProperty(const char *p, const vector<list<int> > &m) |
no test coverage detected