![]() |
My Project
|
#include <cmath>
#include "misc/auxiliary.h"
#include "misc/mylimits.h"
#include "misc/options.h"
#include "misc/int64vec.h"
#include "coeffs/numbers.h"
#include "coeffs/coeffs.h"
#include "polys/monomials/p_polys.h"
#include "polys/simpleideals.h"
#include "polys/monomials/ring.h"
#include "polys/monomials/maps.h"
#include "polys/prCopy.h"
#include "polys/templates/p_Procs.h"
#include "polys/matpol.h"
#include "polys/nc/nc.h"
#include "polys/nc/sca.h"
#include "ext_fields/algext.h"
#include "ext_fields/transext.h"
#include <ctype.h>
Go to the source code of this file.
Macros | |
#define | BITS_PER_LONG 8*SIZEOF_LONG |
#define | MYTEST 0 |
#define | pFDeg_CASE(A) if(r->pFDeg == A) PrintS( "" #A "" ) |
#define | rOppVar(R, I) (rVar(R)+1-I) |
Typedefs | |
typedef char * | char_ptr |
Functions | |
const char * | rSimpleOrdStr (int ord) |
void | rDelete (ring r) |
unconditionally deletes fields in r More... | |
static void | rSetVarL (ring r) |
set r->VarL_Size, r->VarL_Offset, r->VarL_LowIndex More... | |
static unsigned long | rGetDivMask (int bits) |
get r->divmask depending on bits per exponent More... | |
static void | rRightAdjustVarOffset (ring r) |
right-adjust r->VarOffset More... | |
static void | rOptimizeLDeg (ring r) |
ring | rDefault (const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl, unsigned long bitmask) |
ring | rDefault (int ch, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl) |
ring | rDefault (const coeffs cf, int N, char **n, const rRingOrder_t o) |
ring | rDefault (int ch, int N, char **n) |
BOOLEAN | rCheckIV (const intvec *iv) |
int | rTypeOfMatrixOrder (const intvec *order) |
int | r_IsRingVar (const char *n, char **names, int N) |
void | rWrite (ring r, BOOLEAN details) |
rRingOrder_t | rOrderName (char *ordername) |
char * | rOrdStr (ring r) |
char * | rVarStr (ring r) |
char * | rCharStr (const ring r) |
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar. More... | |
char * | rParStr (ring r) |
char * | rString (ring r) |
int | rChar (ring r) |
ring | nc_rCreateNCcomm_rCopy (ring r) |
int | rSumInternal (ring r1, ring r2, ring &sum, BOOLEAN vartest, BOOLEAN dp_dp) |
returns -1 for not compatible, 1 for compatible (and sum) dp_dp:0: block ordering, 1: dp,dp, 2: aa(...),dp vartest: check for name conflicts More... | |
int | rSum (ring r1, ring r2, ring &sum) |
ring | rCopy0 (const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering) |
ring | rCopy0AndAddA (const ring r, int64vec *wv64, BOOLEAN copy_qideal, BOOLEAN copy_ordering) |
ring | rCopy (ring r) |
BOOLEAN | rEqual (ring r1, ring r2, BOOLEAN qr) |
returns TRUE, if r1 equals r2 FALSE, otherwise Equality is determined componentwise, if qr == 1, then qrideal equality is tested, as well More... | |
BOOLEAN | rSamePolyRep (ring r1, ring r2) |
returns TRUE, if r1 and r2 represents the monomials in the same way FALSE, otherwise this is an analogue to rEqual but not so strict More... | |
rOrderType_t | rGetOrderType (ring r) |
BOOLEAN | rHas_c_Ordering (const ring r) |
BOOLEAN | rHasSimpleOrder (const ring r) |
BOOLEAN | rHasSimpleLexOrder (const ring r) |
returns TRUE, if simple lp or ls ordering More... | |
BOOLEAN | rOrder_is_DegOrdering (const rRingOrder_t order) |
BOOLEAN | rOrder_is_WeightedOrdering (rRingOrder_t order) |
BOOLEAN | rHasSimpleOrderAA (ring r) |
BOOLEAN | rOrd_SetCompRequiresSetm (const ring r) |
return TRUE if p_SetComp requires p_Setm More... | |
BOOLEAN | rOrd_is_Totaldegree_Ordering (const ring r) |
BOOLEAN | rOrd_is_WeightedDegree_Ordering (const ring r) |
BOOLEAN | rIsPolyVar (int v, const ring r) |
returns TRUE if var(i) belongs to p-block More... | |
BOOLEAN | rDBTest (ring r, const char *fn, const int l) |
static void | rO_Align (int &place, int &bitplace) |
static void | rO_TDegree (int &place, int &bitplace, int start, int end, long *o, sro_ord &ord_struct) |
static void | rO_TDegree_neg (int &place, int &bitplace, int start, int end, long *o, sro_ord &ord_struct) |
static void | rO_WDegree (int &place, int &bitplace, int start, int end, long *o, sro_ord &ord_struct, int *weights) |
static void | rO_WMDegree (int &place, int &bitplace, int start, int end, long *o, sro_ord &ord_struct, int *weights) |
static void | rO_WDegree64 (int &place, int &bitplace, int start, int end, long *o, sro_ord &ord_struct, int64 *weights) |
static void | rO_WDegree_neg (int &place, int &bitplace, int start, int end, long *o, sro_ord &ord_struct, int *weights) |
static void | rO_LexVars (int &place, int &bitplace, int start, int end, int &prev_ord, long *o, int *v, int bits, int opt_var) |
static void | rO_LexVars_neg (int &place, int &bitplace, int start, int end, int &prev_ord, long *o, int *v, int bits, int opt_var) |
static void | rO_Syzcomp (int &place, int &bitplace, int &prev_ord, long *o, sro_ord &ord_struct) |
static void | rO_Syz (int &place, int &bitplace, int &prev_ord, int syz_comp, long *o, sro_ord &ord_struct) |
static void | rO_ISPrefix (int &place, int &bitplace, int &prev_ord, long *o, int, int *v, sro_ord &ord_struct) |
static void | rO_ISSuffix (int &place, int &bitplace, int &prev_ord, long *o, int N, int *v, sro_ord *tmp_typ, int &typ_i, int sgn) |
static unsigned long | rGetExpSize (unsigned long bitmask, int &bits) |
unsigned long | rGetExpSize (unsigned long bitmask, int &bits, int N) |
ring | rModifyRing (ring r, BOOLEAN omit_degree, BOOLEAN try_omit_comp, unsigned long exp_limit) |
ring | rModifyRing_Wp (ring r, int *weights) |
construct Wp, C ring More... | |
ring | rModifyRing_Simple (ring r, BOOLEAN ommit_degree, BOOLEAN ommit_comp, unsigned long exp_limit, BOOLEAN &simple) |
void | rKillModifiedRing (ring r) |
void | rKillModified_Wp_Ring (ring r) |
static void | rSetOutParams (ring r) |
static void | rSetFirstWv (ring r, int i, rRingOrder_t *order, int *block1, int **wvhdl) |
static void | rSetDegStuff (ring r) |
static void | rSetNegWeight (ring r) |
static void | rSetOption (ring r) |
static void | rCheckOrdSgn (ring r, int i) |
void | p_SetGlobals (const ring r, BOOLEAN complete) |
set all properties of a new ring - also called by rComplete More... | |
static int | sign (int x) |
BOOLEAN | rOrd_is_MixedDegree_Ordering (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 VarOffset), unless they already exist with force == 1, new fields are always created (overwritten), even if they exist More... | |
void | rUnComplete (ring r) |
void | rDebugPrint (const ring r) |
void | p_DebugPrint (poly p, const ring r) |
static void | m_DebugPrint (const poly p, const ring R) |
debug-print monomial poly/vector p, assuming that it lives in the ring R More... | |
void | pISUpdateComponents (ideal F, const intvec *const V, const int MIN, const ring r) |
static void | rNChangeSComps (int *currComponents, long *currShiftedComponents, ring r) |
static void | rNGetSComps (int **currComponents, long **currShiftedComponents, ring r) |
static void | rDBChangeSComps (int *currComponents, long *currShiftedComponents, int length, ring r) |
static void | rDBGetSComps (int **currComponents, long **currShiftedComponents, int *length, ring r) |
void | rChangeSComps (int *currComponents, long *currShiftedComponents, int length, ring r) |
void | rGetSComps (int **currComponents, long **currShiftedComponents, int *length, ring r) |
ring | rAssure_SyzOrder (const ring r, BOOLEAN complete) |
ring | rAssure_SyzComp (const ring r, BOOLEAN complete) |
ring | rAssure_TDeg (ring r, int &pos) |
ring | rAssure_HasComp (const ring r) |
ring | rAssure_CompLastBlock (ring r, BOOLEAN complete) |
makes sure that c/C ordering is last ordering More... | |
ring | rAssure_SyzComp_CompLastBlock (const ring r) |
makes sure that c/C ordering is last ordering and SyzIndex is first More... | |
static ring | rAssure_Global (rRingOrder_t b1, rRingOrder_t b2, const ring r) |
ring | rAssure_InducedSchreyerOrdering (const ring r, BOOLEAN complete, int sgn) |
ring | rAssure_dp_S (const ring r) |
ring | rAssure_dp_C (const ring r) |
ring | rAssure_C_dp (const ring r) |
ring | rAssure_c_dp (const ring r) |
int | rGetISPos (const int p, const ring r) |
Finds p^th IS ordering, and returns its position in r->typ[] returns -1 if something went wrong! p - starts with 0! More... | |
BOOLEAN | rSetISReference (const ring r, const ideal F, const int i, const int p) |
Changes r by setting induced ordering parameters: limit and reference leading terms F belong to r, we will DO a copy! We will use it AS IS! returns true is everything was allright! More... | |
void | rSetSyzComp (int k, const ring r) |
int | rGetMaxSyzComp (int i, const ring r) |
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit More... | |
BOOLEAN | rRing_is_Homog (const ring r) |
BOOLEAN | rRing_has_CompLastBlock (const ring r) |
BOOLEAN | rRing_ord_pure_dp (const ring r) |
BOOLEAN | rRing_ord_pure_Dp (const ring r) |
BOOLEAN | rRing_ord_pure_lp (const ring r) |
int64 * | rGetWeightVec (const ring r) |
void | rSetWeightVec (ring r, int64 *wv) |
static int | rRealloc1 (ring r, int size, int pos) |
static void | rOppWeight (int *w, int l) |
ring | rOpposite (ring src) |
ring | rEnvelope (ring R) |
BOOLEAN | nc_rComplete (const ring src, ring dest, bool bSetupQuotient) |
void | rModify_a_to_A (ring r) |
poly | rGetVar (const int varIndex, const ring r) |
int | n_IsParam (const number m, const ring r) |
TODO: rewrite somehow... More... | |
ring | rPlusVar (const ring r, char *v, int left) |
K[x],"y" -> K[x,y] resp. K[y,x]. More... | |
ring | rMinusVar (const ring r, char *v) |
undo rPlusVar More... | |
Variables | |
VAR omBin | sip_sring_bin = omGetSpecBin(sizeof(ip_sring)) |
VAR omBin | char_ptr_bin = omGetSpecBin(sizeof(char_ptr)) |
static const char *const | ringorder_name [] |
VAR int | pDBsyzComp =0 |
debug-print monomial poly/vector p, assuming that it lives in the ring R
Definition at line 4295 of file ring.cc.
TODO: rewrite somehow...
if m == var(i)/1 => return i,
Definition at line 5758 of file ring.cc.
Definition at line 5647 of file ring.cc.
ring nc_rCreateNCcomm_rCopy | ( | ring | r | ) |
void p_DebugPrint | ( | poly | p, |
const ring | r | ||
) |
set all properties of a new ring - also called by rComplete
int r_IsRingVar | ( | const char * | n, |
char ** | names, | ||
int | N | ||
) |
ring rAssure_C_dp | ( | const ring | r | ) |
Definition at line 4926 of file ring.cc.
ring rAssure_CompLastBlock | ( | ring | r, |
BOOLEAN | complete | ||
) |
makes sure that c/C ordering is last ordering
Definition at line 4649 of file ring.cc.
ring rAssure_dp_C | ( | const ring | r | ) |
|
static |
Definition at line 4759 of file ring.cc.
ring rAssure_HasComp | ( | const ring | r | ) |
Definition at line 4594 of file ring.cc.
Definition at line 4805 of file ring.cc.
Definition at line 4418 of file ring.cc.
ring rAssure_SyzComp_CompLastBlock | ( | const ring | r | ) |
makes sure that c/C ordering is last ordering and SyzIndex is first
? rChangeCurrRing(new_r);
Definition at line 4704 of file ring.cc.
ring rAssure_TDeg | ( | ring | r, |
int & | pos | ||
) |
Definition at line 4496 of file ring.cc.
void rChangeSComps | ( | int * | currComponents, |
long * | currShiftedComponents, | ||
int | length, | ||
ring | r | ||
) |
Definition at line 4388 of file ring.cc.
char * rCharStr | ( | const ring | r | ) |
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
Definition at line 645 of file ring.cc.
|
static |
Definition at line 3797 of file ring.cc.
BOOLEAN rComplete | ( | ring | r, |
int | force | ||
) |
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffset), unless they already exist with force == 1, new fields are always created (overwritten), even if they exist
Definition at line 3395 of file ring.cc.
ring rCopy | ( | ring | r | ) |
Definition at line 1363 of file ring.cc.
Definition at line 1492 of file ring.cc.
|
inlinestatic |
|
inlinestatic |
Definition at line 4376 of file ring.cc.
Definition at line 1989 of file ring.cc.
void rDebugPrint | ( | const ring | r | ) |
Definition at line 4067 of file ring.cc.
ring rDefault | ( | const coeffs | cf, |
int | N, | ||
char ** | n, | ||
const rRingOrder_t | o | ||
) |
Definition at line 138 of file ring.cc.
ring rDefault | ( | const coeffs | cf, |
int | N, | ||
char ** | n, | ||
int | ord_size, | ||
rRingOrder_t * | ord, | ||
int * | block0, | ||
int * | block1, | ||
int ** | wvhdl, | ||
unsigned long | bitmask | ||
) |
Definition at line 102 of file ring.cc.
ring rDefault | ( | int | ch, |
int | N, | ||
char ** | n | ||
) |
Definition at line 155 of file ring.cc.
ring rDefault | ( | int | ch, |
int | N, | ||
char ** | n, | ||
int | ord_size, | ||
rRingOrder_t * | ord, | ||
int * | block0, | ||
int * | block1, | ||
int ** | wvhdl | ||
) |
void rDelete | ( | ring | r | ) |
unconditionally deletes fields in r
Definition at line 449 of file ring.cc.
ring rEnvelope | ( | ring | R | ) |
returns TRUE, if r1 equals r2 FALSE, otherwise Equality is determined componentwise, if qr == 1, then qrideal equality is tested, as well
Definition at line 1660 of file ring.cc.
|
static |
|
static |
Definition at line 2510 of file ring.cc.
unsigned long rGetExpSize | ( | unsigned long | bitmask, |
int & | bits, | ||
int | N | ||
) |
Definition at line 2603 of file ring.cc.
Finds p^th IS ordering, and returns its position in r->typ[] returns -1 if something went wrong! p - starts with 0!
return the position of the p^th IS block order block in r->typ[]...
Definition at line 4941 of file ring.cc.
int rGetMaxSyzComp | ( | int | i, |
const ring | r | ||
) |
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit
rOrderType_t rGetOrderType | ( | ring | r | ) |
Definition at line 1754 of file ring.cc.
void rGetSComps | ( | int ** | currComponents, |
long ** | currShiftedComponents, | ||
int * | length, | ||
ring | r | ||
) |
Definition at line 4397 of file ring.cc.
Definition at line 5748 of file ring.cc.
returns TRUE, if simple lp or ls ordering
Definition at line 1833 of file ring.cc.
BOOLEAN rHasSimpleOrderAA | ( | ring | r | ) |
void rKillModified_Wp_Ring | ( | ring | r | ) |
void rKillModifiedRing | ( | ring | r | ) |
ring rMinusVar | ( | const ring | r, |
char * | v | ||
) |
void rModify_a_to_A | ( | ring | r | ) |
< How many induced ordering block do we have?
Definition at line 2643 of file ring.cc.
ring rModifyRing_Simple | ( | ring | r, |
BOOLEAN | ommit_degree, | ||
BOOLEAN | ommit_comp, | ||
unsigned long | exp_limit, | ||
BOOLEAN & | simple | ||
) |
Definition at line 2938 of file ring.cc.
ring rModifyRing_Wp | ( | ring | r, |
int * | weights | ||
) |
construct Wp, C ring
Definition at line 2890 of file ring.cc.
|
inlinestatic |
Definition at line 4350 of file ring.cc.
|
inlinestatic |
Definition at line 4358 of file ring.cc.
|
static |
Definition at line 2139 of file ring.cc.
|
static |
Definition at line 2401 of file ring.cc.
|
static |
Definition at line 2419 of file ring.cc.
|
static |
Definition at line 2284 of file ring.cc.
|
static |
Definition at line 2321 of file ring.cc.
|
static |
Definition at line 2375 of file ring.cc.
|
static |
|
static |
|
static |
|
static |
Definition at line 2178 of file ring.cc.
|
static |
Definition at line 2240 of file ring.cc.
|
static |
Definition at line 2258 of file ring.cc.
|
static |
Definition at line 2218 of file ring.cc.
ring rOpposite | ( | ring | src | ) |
Definition at line 5243 of file ring.cc.
|
static |
|
static |
Definition at line 3095 of file ring.cc.
BOOLEAN rOrd_is_MixedDegree_Ordering | ( | ring | r | ) |
Definition at line 1927 of file ring.cc.
Definition at line 1941 of file ring.cc.
BOOLEAN rOrder_is_DegOrdering | ( | const rRingOrder_t | order | ) |
BOOLEAN rOrder_is_WeightedOrdering | ( | rRingOrder_t | order | ) |
rRingOrder_t rOrderName | ( | char * | ordername | ) |
char * rOrdStr | ( | ring | r | ) |
Definition at line 520 of file ring.cc.
char * rParStr | ( | ring | r | ) |
ring rPlusVar | ( | const ring | r, |
char * | v, | ||
int | left | ||
) |
K[x],"y" -> K[x,y] resp. K[y,x].
Definition at line 5779 of file ring.cc.
|
static |
Definition at line 5204 of file ring.cc.
|
static |
right-adjust r->VarOffset
BOOLEAN rSamePolyRep | ( | ring | r1, |
ring | r2 | ||
) |
returns TRUE, if r1 and r2 represents the monomials in the same way FALSE, otherwise this is an analogue to rEqual but not so strict
|
static |
Definition at line 3122 of file ring.cc.
|
static |
Changes r by setting induced ordering parameters: limit and reference leading terms F belong to r, we will DO a copy! We will use it AS IS! returns true is everything was allright!
Definition at line 4973 of file ring.cc.
|
static |
|
static |
Definition at line 3329 of file ring.cc.
|
static |
Definition at line 3025 of file ring.cc.
void rSetSyzComp | ( | int | k, |
const ring | r | ||
) |
Definition at line 5027 of file ring.cc.
|
static |
set r->VarL_Size, r->VarL_Offset, r->VarL_LowIndex
Definition at line 3972 of file ring.cc.
void rSetWeightVec | ( | ring | r, |
int64 * | wv | ||
) |
char * rString | ( | ring | r | ) |
Definition at line 671 of file ring.cc.
int rSum | ( | ring | r1, |
ring | r2, | ||
ring & | sum | ||
) |
Definition at line 1344 of file ring.cc.
returns -1 for not compatible, 1 for compatible (and sum) dp_dp:0: block ordering, 1: dp,dp, 2: aa(...),dp vartest: check for name conflicts
Definition at line 747 of file ring.cc.
void rUnComplete | ( | ring | r | ) |
Definition at line 3910 of file ring.cc.
char * rVarStr | ( | ring | r | ) |
void rWrite | ( | ring | r, |
BOOLEAN | details | ||
) |
Definition at line 226 of file ring.cc.
|
inlinestatic |