![]() |
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 | |
static void | rSetVarL (ring r) |
set r->VarL_Size, r->VarL_Offset, r->VarL_LowIndex | |
static unsigned long | rGetDivMask (int bits) |
get r->divmask depending on bits per exponent | |
static void | rRightAdjustVarOffset (ring r) |
right-adjust r->VarOffset | |
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. | |
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 | |
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 | |
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 | |
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 | |
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 | |
BOOLEAN | rOrd_is_Totaldegree_Ordering (const ring r) |
BOOLEAN | rOrd_is_dp (const ring r) |
BOOLEAN | rOrd_is_ds (const ring r) |
BOOLEAN | rOrd_is_WeightedDegree_Ordering (const ring r) |
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 N, 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 | |
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 *block0, 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 | |
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 | |
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 | |
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 | |
ring | rAssure_SyzComp_CompLastBlock (const ring r) |
makes sure that c/C ordering is last ordering and SyzIndex is first | |
static ring | rAssure_Global (rRingOrder_t b1, rRingOrder_t b2, const ring r) |
ring | rAssure_Wp_C (const ring r, intvec *w) |
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_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! | |
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! | |
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 | |
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) |
poly | rGetVar (const int varIndex, const ring r) |
int | n_IsParam (const number m, const ring r) |
TODO: rewrite somehow... | |
ring | rPlusVar (const ring r, char *v, int left) |
K[x],"y" -> K[x,y] resp. K[y,x]. | |
ring | rMinusVar (const ring r, char *v) |
undo rPlusVar | |
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 4381 of file ring.cc.
TODO: rewrite somehow...
if m == var(i)/1 => return i,
Definition at line 5860 of file ring.cc.
Definition at line 5772 of file ring.cc.
ring nc_rCreateNCcomm_rCopy | ( | ring | r | ) |
void p_DebugPrint | ( | poly | p, |
const ring | r ) |
int r_IsRingVar | ( | const char * | n, |
char ** | names, | ||
int | N ) |
ring rAssure_C_dp | ( | const ring | r | ) |
Definition at line 5068 of file ring.cc.
ring rAssure_CompLastBlock | ( | ring | r, |
BOOLEAN | complete ) |
makes sure that c/C ordering is last ordering
Definition at line 4725 of file ring.cc.
ring rAssure_dp_C | ( | const ring | r | ) |
|
static |
Definition at line 4835 of file ring.cc.
ring rAssure_HasComp | ( | const ring | r | ) |
Definition at line 4656 of file ring.cc.
Definition at line 4928 of file ring.cc.
Definition at line 4466 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 4780 of file ring.cc.
ring rAssure_TDeg | ( | ring | r, |
int & | pos ) |
Definition at line 4558 of file ring.cc.
Definition at line 4881 of file ring.cc.
void rChangeSComps | ( | int * | currComponents, |
long * | currShiftedComponents, | ||
int | length, | ||
ring | r ) |
Definition at line 4436 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 650 of file ring.cc.
|
static |
Definition at line 3883 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 3465 of file ring.cc.
ring rCopy | ( | ring | r | ) |
Definition at line 1424 of file ring.cc.
Definition at line 1567 of file ring.cc.
|
inlinestatic |
|
inlinestatic |
Definition at line 4424 of file ring.cc.
Definition at line 2055 of file ring.cc.
void rDebugPrint | ( | const ring | r | ) |
Definition at line 4153 of file ring.cc.
ring rDefault | ( | const coeffs | cf, |
int | N, | ||
char ** | n, | ||
const rRingOrder_t | o ) |
Definition at line 139 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 103 of file ring.cc.
ring rDefault | ( | int | ch, |
int | N, | ||
char ** | n ) |
Definition at line 156 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 452 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 1749 of file ring.cc.
|
static |
|
static |
Definition at line 2587 of file ring.cc.
unsigned long rGetExpSize | ( | unsigned long | bitmask, |
int & | bits, | ||
int | N ) |
Definition at line 2680 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 5083 of file ring.cc.
int rGetMaxSyzComp | ( | int | i, |
const ring | r ) |
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit
Definition at line 5241 of file ring.cc.
rOrderType_t rGetOrderType | ( | ring | r | ) |
Definition at line 1843 of file ring.cc.
void rGetSComps | ( | int ** | currComponents, |
long ** | currShiftedComponents, | ||
int * | length, | ||
ring | r ) |
Definition at line 4445 of file ring.cc.
Definition at line 5850 of file ring.cc.
returns TRUE, if simple lp or ls ordering
Definition at line 1922 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 ) |
< How many induced ordering block do we have?
Definition at line 2715 of file ring.cc.
ring rModifyRing_Simple | ( | ring | r, |
BOOLEAN | ommit_degree, | ||
BOOLEAN | ommit_comp, | ||
unsigned long | exp_limit, | ||
BOOLEAN & | simple ) |
Definition at line 3010 of file ring.cc.
ring rModifyRing_Wp | ( | ring | r, |
int * | weights ) |
construct Wp, C ring
Definition at line 2962 of file ring.cc.
|
inlinestatic |
Definition at line 4398 of file ring.cc.
|
inlinestatic |
Definition at line 4406 of file ring.cc.
|
static |
Definition at line 2205 of file ring.cc.
|
static |
Definition at line 2473 of file ring.cc.
|
static |
Definition at line 2496 of file ring.cc.
|
static |
Definition at line 2356 of file ring.cc.
|
static |
Definition at line 2393 of file ring.cc.
|
static |
Definition at line 2447 of file ring.cc.
|
static |
|
static |
|
static |
|
static |
Definition at line 2244 of file ring.cc.
|
static |
Definition at line 2306 of file ring.cc.
|
static |
Definition at line 2330 of file ring.cc.
|
static |
Definition at line 2284 of file ring.cc.
ring rOpposite | ( | ring | src | ) |
Definition at line 5364 of file ring.cc.
|
static |
|
static |
Definition at line 3167 of file ring.cc.
Definition at line 2029 of file ring.cc.
Definition at line 2036 of file ring.cc.
BOOLEAN rOrd_is_MixedDegree_Ordering | ( | ring | r | ) |
Definition at line 2016 of file ring.cc.
Definition at line 2044 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 524 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 5881 of file ring.cc.
|
static |
Definition at line 5325 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 3194 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 5115 of file ring.cc.
|
static |
|
static |
Definition at line 3401 of file ring.cc.
|
static |
Definition at line 3097 of file ring.cc.
void rSetSyzComp | ( | int | k, |
const ring | r ) |
Definition at line 5169 of file ring.cc.
|
static |
set r->VarL_Size, r->VarL_Offset, r->VarL_LowIndex
Definition at line 4058 of file ring.cc.
void rSetWeightVec | ( | ring | r, |
int64 * | wv ) |
char * rString | ( | ring | r | ) |
Definition at line 676 of file ring.cc.
int rSum | ( | ring | r1, |
ring | r2, | ||
ring & | sum ) |
Definition at line 1405 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 752 of file ring.cc.
void rUnComplete | ( | ring | r | ) |
Definition at line 3996 of file ring.cc.
char * rVarStr | ( | ring | r | ) |
void rWrite | ( | ring | r, |
BOOLEAN | details ) |
Definition at line 227 of file ring.cc.
|
inlinestatic |
Definition at line 47 of file ring.cc.