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

Function PmInteger2Int

Singular/dyn_modules/polymake/polymake_conversion.cc:121–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119/* polymake -> singular */
120
121int PmInteger2Int(const polymake::Integer& pi, bool &ok)
122{
123 int i=0;
124 try
125 {
126#if POLYMAKE_VERSION >= 301 /* 3.1 */
127 i=int(pi);
128#else
129 i = pi.to_int();
130#endif
131 }
132 catch (const std::exception& ex)
133 {
134 WerrorS("ERROR: "); WerrorS(ex.what()); WerrorS("\n");
135 ok = false;
136 }
137 return i;
138}
139
140number PmInteger2Number (const polymake::Integer& pi)
141{

Callers 15

PMgorensteinIndexFunction · 0.85
PMlatticeVolumeFunction · 0.85
PMlatticeDegreeFunction · 0.85
PMlatticeCodegreeFunction · 0.85
PMfacetWidthFunction · 0.85
PMnLatticePointsFunction · 0.85
PMnInteriorLatticePointsFunction · 0.85
PMnBoundaryLatticePointsFunction · 0.85
PMnHilbertBasisFunction · 0.85
verticesOfFunction · 0.85
PMmaximalValueFunction · 0.85
PMminimalValueFunction · 0.85

Calls 2

WerrorSFunction · 0.85
whatMethod · 0.45

Tested by

no test coverage detected