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

Function toPrintString

gfanlib/gfanlibtest.cpp:34–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34string toPrintString(gfan::ZMatrix const &m, int fieldWidth, char *tab=0)
35{
36 stringstream s;
37
38 for(int i=0;i<m.getHeight();i++)
39 {
40 if(tab)s<<tab;
41 for(int j=0;j<m.getWidth();j++)
42 {
43 stringstream temp;
44 temp<<m[i][j];
45 string temp2=temp.str();
46 for(int k=temp2.size();k<fieldWidth;k++)s<<" ";
47 s<<temp2;
48 if(i+1!=m.getHeight() || j+1!=m.getWidth())
49 {
50 s<<" ";
51 }
52 }
53 s<<endl;
54 }
55 return s.str();
56}
57
58string toString(gfan::ZCone const &c)
59{

Callers 1

mainFunction · 0.85

Calls 7

getHeightMethod · 0.80
getWidthMethod · 0.80
getInequalitiesMethod · 0.80
getEquationsMethod · 0.80
ambientDimensionMethod · 0.80
strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected