Skip to content

Commit

Permalink
fix + chg: print function of matrices, print function of cones
Browse files Browse the repository at this point in the history
  • Loading branch information
Yue Ren committed Jun 5, 2012
1 parent 268c45f commit be9b809
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions callgfanlib/bbcone.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ gfan::ZVector* bigintmatToZVector(const bigintmat &bim)

char* toString(gfan::ZMatrix const &zm)
{
bigintmat bim = zMatrixToBigintmat(zm);
return bim.String();
bigintmat* bim = zMatrixToBigintmat(zm);
char* s = bim->String();
delete bim;
return s;
}

std::string toString(const gfan::ZCone* const c)
Expand All @@ -114,9 +116,15 @@ std::string toString(const gfan::ZCone* const c)
gfan::ZMatrix e=c->getEquations();
s<<"AMBIENT_DIM"<<std::endl;
s<<c->ambientDimension()<<std::endl;
s<<"INEQUALITIES"<<std::endl;
if (c->areFacetsKnown())
s<<"FACETS"<<std::endl;
else
s<<"INEQUALITIES"<<std::endl;
s<<toString(i)<<std::endl;
s<<"EQUATIONS"<<std::endl;
if (c->areImpliedEquationsKnown())
s<<"LINEAR_SPAN"<<std::endl;
else
s<<"EQUATIONS"<<std::endl;
s<<toString(e)<<std::endl;
return s.str();
}
Expand Down

0 comments on commit be9b809

Please sign in to comment.