 |
My Project
UNKNOWN_GIT_VERSION
|
Go to the source code of this file.
|
int | dim (ideal I, ring r) |
|
static void | swapElements (ideal I, ideal J) |
|
static bool | noExtraReduction (ideal I, ring r, number) |
|
static ring | constructStartingRing (ring r) |
| Given a polynomial ring r over the rational numbers and a weighted ordering, returns a polynomial ring s over the integers with one extra variable, which is weighted -1. More...
|
|
static ideal | constructStartingIdeal (ideal originalIdeal, ring originalRing, number uniformizingParameter, ring startingRing) |
|
◆ constructStartingIdeal()
static ideal constructStartingIdeal |
( |
ideal |
originalIdeal, |
|
|
ring |
originalRing, |
|
|
number |
uniformizingParameter, |
|
|
ring |
startingRing |
|
) |
| |
|
static |
Definition at line 229 of file tropicalStrategy.cc.
232 poly
g =
p_One(startingRing);
245 int n =
rVar(originalRing);
246 int* shiftByOne = (
int*)
omAlloc((n+1)*
sizeof(int));
247 for (
int i=1;
i<=n;
i++)
249 for (
int i=0;
i<
k;
i++)
251 if(originalIdeal->m[
i]!=
NULL)
253 J->m[
i] =
p_PermPoly(originalIdeal->m[
i],shiftByOne,originalRing,startingRing,nMap,
NULL,0);
260 ideal startingIdeal =
kNF(pt,startingRing->qideal,J);
264 startingIdeal->m[
k] = pt->m[0];
270 return startingIdeal;
◆ constructStartingRing()
static ring constructStartingRing |
( |
ring |
r | ) |
|
|
static |
Given a polynomial ring r over the rational numbers and a weighted ordering, returns a polynomial ring s over the integers with one extra variable, which is weighted -1.
Definition at line 168 of file tropicalStrategy.cc.
178 char** oldNames =
s->names;
179 s->names = (
char**)
omAlloc((n+1)*
sizeof(
char**));
181 for (
int i=1;
i<n;
i++)
182 s->names[
i] = oldNames[
i-1];
186 s->block0 = (
int*)
omAlloc0(3*
sizeof(
int));
187 s->block1 = (
int*)
omAlloc0(3*
sizeof(
int));
188 s->wvhdl = (
int**)
omAlloc0(3*
sizeof(
int**));
192 s->wvhdl[0] = (
int*)
omAlloc(n*
sizeof(
int));
204 for (
int i=1;
i<n;
i++)
209 for (
int i=1;
i<n;
i++)
214 for (
int i=1;
i<n;
i++)
215 s->wvhdl[0][
i] = r->wvhdl[0][
i-1];
219 for (
int i=1;
i<n;
i++)
220 s->wvhdl[0][
i] = -r->wvhdl[0][
i-1];
◆ dim()
int dim |
( |
ideal |
I, |
|
|
ring |
r |
|
) |
| |
◆ noExtraReduction()
static bool noExtraReduction |
( |
ideal |
I, |
|
|
ring |
r, |
|
|
number |
|
|
) |
| |
|
static |
Definition at line 64 of file tropicalStrategy.cc.
67 gfan::ZVector allOnes(n);
68 for (
int i=0;
i<n;
i++)
70 ring rShortcut =
rCopy0(r);
73 int* block0 = rShortcut->block0;
74 int* block1 = rShortcut->block1;
75 int** wvhdl = rShortcut->wvhdl;
79 rShortcut->block0 = (
int*)
omAlloc0((
h+2)*
sizeof(int));
80 rShortcut->block1 = (
int*)
omAlloc0((
h+2)*
sizeof(int));
81 rShortcut->wvhdl = (
int**)
omAlloc0((
h+2)*
sizeof(
int*));
83 rShortcut->block0[0] = 1;
84 rShortcut->block1[0] = n;
87 for (
int i=1;
i<=
h;
i++)
89 rShortcut->order[
i] = order[
i-1];
90 rShortcut->block0[
i] = block0[
i-1];
91 rShortcut->block1[
i] = block1[
i-1];
92 rShortcut->wvhdl[
i] = wvhdl[
i-1];
110 for (
int i=0;
i<
k;
i++)
122 for (
int i=0;
i<
k;
i++)
◆ swapElements()
static void swapElements |
( |
ideal |
I, |
|
|
ideal |
J |
|
) |
| |
|
static |
#define idDelete(H)
delete an ideal
void rChangeCurrRing(ring r)
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
int scDimInt(ideal S, ideal Q)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
#define omFreeSize(addr, size)
int * ZVectorToIntStar(const gfan::ZVector &v, bool &overflow)
static BOOLEAN rField_is_Ring(const ring r)
@ n_Z
only used if HAVE_RINGS is defined
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
ideal gfanlib_kStd_wrapper(ideal I, ring r, tHomog h=testHomog)
static int rBlocks(ring r)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
void rDelete(ring r)
unconditionally deletes fields in r
ideal idInit(int idsize, int rank)
initialise an ideal / module
static number p_SetCoeff(poly p, number n, ring r)
bool areIdealsEqual(ideal I, ring r, ideal J, ring s)
static void p_Setm(poly p, const ring r)
const CanonicalForm int s
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
static BOOLEAN rField_is_Z(const ring r)
ideal id_Head(ideal h, const ring r)
returns the ideals of initial terms
static FORCE_INLINE BOOLEAN n_IsUnit(number n, const coeffs r)
TRUE iff n has a multiplicative inverse in the given coeff field/ring r.
void nKillChar(coeffs r)
undo all initialisations
#define idPosConstant(I)
index of generator with leading term in ground ring (if any); otherwise -1
static void swapElements(ideal I, ideal J)
static BOOLEAN rField_is_Q(const ring r)
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...