![]() |
#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) |
BOOLEAN | rHasTDeg (ring r) |
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 (ring r) |
BOOLEAN | rRing_has_CompLastBlock (ring r) |
n_coeffType | rFieldType (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 | |
omBin | sip_sring_bin = omGetSpecBin(sizeof(ip_sring)) |
omBin | char_ptr_bin = omGetSpecBin(sizeof(char_ptr)) |
static const char *const | ringorder_name [] |
int | pDBsyzComp =0 |
debug-print monomial poly/vector p, assuming that it lives in the ring R
Definition at line 4269 of file ring.cc.
TODO: rewrite somehow...
if m == var(i)/1 => return i,
Definition at line 5674 of file ring.cc.
Definition at line 5563 of file ring.cc.
ring nc_rCreateNCcomm_rCopy | ( | ring | r | ) |
Definition at line 719 of file ring.cc.
void p_DebugPrint | ( | poly | p, |
const ring | r | ||
) |
Definition at line 4246 of file ring.cc.
ring rAssure_C_dp | ( | const ring | r | ) |
Definition at line 4915 of file ring.cc.
ring rAssure_c_dp | ( | const ring | r | ) |
Definition at line 4920 of file ring.cc.
ring rAssure_CompLastBlock | ( | ring | r, |
BOOLEAN | complete | ||
) |
makes sure that c/C ordering is last ordering
Definition at line 4638 of file ring.cc.
ring rAssure_dp_C | ( | const ring | r | ) |
Definition at line 4910 of file ring.cc.
ring rAssure_dp_S | ( | const ring | r | ) |
Definition at line 4905 of file ring.cc.
|
static |
Definition at line 4748 of file ring.cc.
ring rAssure_HasComp | ( | const ring | r | ) |
Definition at line 4583 of file ring.cc.
Definition at line 4794 of file ring.cc.
Definition at line 4392 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 4693 of file ring.cc.
ring rAssure_TDeg | ( | ring | r, |
int & | pos | ||
) |
Definition at line 4488 of file ring.cc.
void rChangeSComps | ( | int * | currComponents, |
long * | currShiftedComponents, | ||
int | length, | ||
ring | r | ||
) |
Definition at line 4362 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 647 of file ring.cc.
|
static |
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 3394 of file ring.cc.
ring rCopy | ( | ring | r | ) |
Definition at line 1645 of file ring.cc.
Definition at line 1365 of file ring.cc.
Definition at line 1493 of file ring.cc.
|
inlinestatic |
Definition at line 4340 of file ring.cc.
|
inlinestatic |
Definition at line 4350 of file ring.cc.
Definition at line 1984 of file ring.cc.
void rDebugPrint | ( | const ring | r | ) |
Definition at line 4041 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, | ||
int | ord_size, | ||
rRingOrder_t * | ord, | ||
int * | block0, | ||
int * | block1, | ||
int ** | wvhdl | ||
) |
Definition at line 130 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 | ( | int | ch, |
int | N, | ||
char ** | n | ||
) |
Definition at line 155 of file ring.cc.
void rDelete | ( | ring | r | ) |
unconditionally deletes fields in r
Definition at line 448 of file ring.cc.
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.
n_coeffType rFieldType | ( | ring | r | ) |
Definition at line 5144 of file ring.cc.
|
static |
|
static |
unsigned long rGetExpSize | ( | unsigned long | bitmask, |
int & | bits, | ||
int | N | ||
) |
Definition at line 2598 of file ring.cc.
int rGetMaxSyzComp | ( | int | i, |
const ring | r | ||
) |
rOrderType_t rGetOrderType | ( | ring | r | ) |
Definition at line 1749 of file ring.cc.
void rGetSComps | ( | int ** | currComponents, |
long ** | currShiftedComponents, | ||
int * | length, | ||
ring | r | ||
) |
Definition at line 4371 of file ring.cc.
Definition at line 5664 of file ring.cc.
BOOLEAN rHasSimpleOrderAA | ( | ring | r | ) |
returns TRUE if var(i) belongs to p-block
ring rMinusVar | ( | const ring | r, |
char * | v | ||
) |
undo rPlusVar
Definition at line 5777 of file ring.cc.
< How many induced ordering block do we have?
Definition at line 2638 of file ring.cc.
ring rModifyRing_Simple | ( | ring | r, |
BOOLEAN | ommit_degree, | ||
BOOLEAN | ommit_comp, | ||
unsigned long | exp_limit, | ||
BOOLEAN & | simple | ||
) |
Definition at line 2933 of file ring.cc.
ring rModifyRing_Wp | ( | ring | r, |
int * | weights | ||
) |
construct Wp, C ring
Definition at line 2885 of file ring.cc.
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
static |
Definition at line 2414 of file ring.cc.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 2173 of file ring.cc.
|
static |
|
static |
|
static |
ring rOpposite | ( | ring | src | ) |
Definition at line 5219 of file ring.cc.
|
static |
|
static |
Definition at line 3094 of file ring.cc.
BOOLEAN rOrd_is_MixedDegree_Ordering | ( | ring | r | ) |
Definition at line 3372 of file ring.cc.
Definition at line 1922 of file ring.cc.
Definition at line 1936 of file ring.cc.
return TRUE if p_SetComp requires p_Setm
Definition at line 1902 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 | ) |
ring rPlusVar | ( | const ring | r, |
char * | v, | ||
int | left | ||
) |
K[x],"y" -> K[x,y] resp. K[y,x].
Definition at line 5695 of file ring.cc.
|
static |
Definition at line 5183 of file ring.cc.
|
static |
BOOLEAN rRing_has_CompLastBlock | ( | ring | r | ) |
BOOLEAN rSamePolyRep | ( | ring | r1, |
ring | r2 | ||
) |
|
static |
Definition at line 3121 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 4962 of file ring.cc.
|
static |
void rSetSyzComp | ( | int | k, |
const ring | r | ||
) |
|
static |
char* rString | ( | ring | r | ) |
Definition at line 673 of file ring.cc.
int rSum | ( | ring | r1, |
ring | r2, | ||
ring & | sum | ||
) |
Definition at line 1346 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 749 of file ring.cc.
void rUnComplete | ( | ring | r | ) |
Definition at line 3889 of file ring.cc.
void rWrite | ( | ring | r, |
BOOLEAN | details | ||
) |
Definition at line 226 of file ring.cc.
|
inlinestatic |
omBin char_ptr_bin = omGetSpecBin(sizeof(char_ptr)) |
omBin sip_sring_bin = omGetSpecBin(sizeof(ip_sring)) |