1#include "gfanlib/gfanlib.h"
40 for(
int j=1;
j<=n;
j++)
54 return new gfan::Integer(n->z);
61 gfan::ZMatrix* zm =
new gfan::ZMatrix(d,n);
75 gfan::ZVector* zv=
new gfan::ZVector(bim.
cols());
89 for(
int j=0;
j<d;
j++)
97 for(
int i=0;
i<n;
i++)
98 zv[
i]=gfan::Integer(expv[
i+1]);
105 for(
int j=0;
j<n;
j++)
112 int*
w = (
int*)
omAlloc(
v.size()*
sizeof(int));
113 for (
unsigned i=0;
i<
v.size();
i++)
115 if (!
v[
i].fitsInInt())
118 WerrorS(
"int overflow converting gfan:ZVector to int*");
139 if (setOfCones.size() > 0)
141 std::set<gfan::ZCone>::iterator cone = setOfCones.begin();
142 gfan::ZFan* zf =
new gfan::ZFan(cone->ambientDimension());
143 for (std::set<gfan::ZCone>::iterator cone = setOfCones.begin(); cone!=setOfCones.end(); cone++)
148 return new gfan::ZFan(gfan::ZFan::fullFan(
currRing->N));
151std::set<gfan::ZVector>
rays(std::set<gfan::ZCone> setOfCones)
153 std::set<gfan::ZVector> setOfRays;
154 for (std::set<gfan::ZCone>::iterator cone = setOfCones.begin(); cone!=setOfCones.end(); cone++)
156 gfan::ZMatrix raysOfCone = cone->extremeRays();
157 for (
int i=0;
i<raysOfCone.getHeight();
i++)
158 setOfRays.insert(raysOfCone[
i]);
#define BIMATELEM(M, I, J)
number integerToNumber(const gfan::Integer &I)
bigintmat * zMatrixToBigintmat(const gfan::ZMatrix &zm)
gfan::ZMatrix * bigintmatToZMatrix(const bigintmat &bim)
int * ZVectorToIntStar(const gfan::ZVector &v, bool &overflow)
char * toString(gfan::ZMatrix const &zm)
std::set< gfan::ZVector > rays(std::set< gfan::ZCone > setOfCones)
gfan::Integer * numberToInteger(const number &n)
gfan::ZVector intStar2ZVector(const int d, const int *i)
gfan::ZVector wvhdlEntryToZVector(const int n, const int *wvhdl0)
gfan::ZVector expvToZVector(const int n, const int *expv)
bigintmat * zVectorToBigintmat(const gfan::ZVector &zv)
gfan::ZFan * toFanStar(std::set< gfan::ZCone > setOfCones)
gfan::ZVector * bigintmatToZVector(const bigintmat &bim)
char * StringAsPrinted()
Returns a string as it would have been printed in the interpreter.
void set(int i, int j, number n, const coeffs C=NULL)
replace an entry with a copy (delete old + copy new!). NOTE: starts at [1,1]
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE number n_InitMPZ(mpz_t n, const coeffs r)
conversion of a GMP integer to number
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
void WerrorS(const char *s)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...