Loading...
Searching...
No Matches
sTObject Class Reference

`#include <kutil.h>`

## Public Member Functions

KINLINE void | Init (ring r=currRing)
KINLINE | sTObject (ring tailRing=currRing)
KINLINE | sTObject (poly p, ring tailRing=currRing)
KINLINE | sTObject (poly p, ring c_r, ring tailRing)
KINLINE | sTObject (sTObject *T, int copy)
KINLINE void | Set (ring r=currRing)
KINLINE void | Set (poly p_in, ring r=currRing)
KINLINE void | Set (poly p_in, ring c_r, ring t_r)
KINLINE void | Delete ()
KINLINE void | Clear ()
KINLINE void | Copy ()
KINLINE poly | GetLmCurrRing ()
KINLINE poly | GetLmTailRing ()
KINLINE poly | GetLm (ring r)
KINLINE void | GetLm (poly &p, ring &r) const
KINLINE BOOLEAN | IsNull () const
KINLINE int | GetpLength ()
KINLINE void | SetLmCurrRing ()
KINLINE poly | Next ()
KINLINE void | LmDeleteAndIter ()
KINLINE long | pTotalDeg () const
KINLINE long | pFDeg () const
KINLINE long | SetpFDeg ()
KINLINE long | GetpFDeg () const
KINLINE long | pLDeg ()
KINLINE long | SetDegStuffReturnLDeg ()
KINLINE void | Mult_nn (number n)
KINLINE void | ShallowCopyDelete (ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
KINLINE void | pNorm ()
KINLINE void | pCleardenom ()
KINLINE void | pContent ()
void | wrp ()

## Data Fields

unsigned long | sevSig
poly | sig
poly | p
poly | t_p
poly | max_exp
ring | tailRing
long | FDeg
int | ecart
int | length
int | pLength
int | i_r
int | shift
char | is_normalized
char | is_redundant
char | is_sigsafe
char | is_special

## Detailed Description

Definition at line 69 of file kutil.h.

## Constructor & Destructor Documentation

## sTObject() [1/4]

KINLINE sTObject::sTObject | ( | ring | tailRing = currRing | ) |

Definition at line 116 of file kInline.h.

{
Init(r);
}
sTObject::Init
KINLINE void Init(ring r=currRing)
Definition kInline.h:110

## sTObject() [2/4]

KINLINE sTObject::sTObject | ( | poly | p,
|  | ring | tailRing = currRing )

Definition at line 145 of file kInline.h.

{
Init(r);
Set(p_in, r);
}
sTObject::Set
KINLINE void Set(ring r=currRing)
Definition kInline.h:106

## sTObject() [3/4]

KINLINE sTObject::sTObject | ( | poly | p,
|  | ring | c_r,
|  | ring | tailRing )

Definition at line 176 of file kInline.h.

{
Init(t_r);
Set(p_in, c_r, t_r);
}

## sTObject() [4/4]

KINLINE sTObject::sTObject | ( | sTObject * | T,
|  | int | copy )

Definition at line 182 of file kInline.h.

{
*this = *T;
if (copy)
{
if (t_p != NULL)
{
t_p = p_Copy(t_p, tailRing);
p = k_LmInit_tailRing_2_currRing(t_p, tailRing);
}
else
{
p = p_Copy(p, currRing);
}
}
}
sTObject::p
poly p
Definition kutil.h:74
sTObject::t_p
poly t_p
Definition kutil.h:75
sTObject::tailRing
ring tailRing
Definition kutil.h:77
copy
CFArray copy(const CFList &list)
write elements of list into an array
Definition facFqBivarUtil.cc:364
T
STATIC_VAR jList * T
Definition janet.cc:30
k_LmInit_tailRing_2_currRing
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
Definition kInline.h:968
NULL
#define NULL
Definition omList.c:12
p_Copy
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition p_polys.h:848
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13

## Member Function Documentation

## Clear()

KINLINE void sTObject::Clear | ( |  | ) |

Definition at line 213 of file kInline.h.

{
p = NULL;
t_p = NULL;
ecart = 0;
length = 0;
pLength = 0;
FDeg = 0;
is_normalized = FALSE;
}
FALSE
#define FALSE
Definition auxiliary.h:97
sTObject::length
int length
Definition kutil.h:80
sTObject::ecart
int ecart
Definition kutil.h:79
sTObject::is_normalized
char is_normalized
Definition kutil.h:88
sTObject::pLength
int pLength
Definition kutil.h:81
sTObject::FDeg
long FDeg
Definition kutil.h:78

## Copy()

KINLINE void sTObject::Copy | ( |  | ) |

Definition at line 224 of file kInline.h.

{
if (t_p != NULL)
{
t_p = p_Copy(t_p, tailRing);
if (p != NULL) /* and t_p!=NULL*/
{
p = p_LmInit(p, currRing);
pGetCoeff(p)=pGetCoeff(t_p);
pNext(p) = pNext(t_p);
}
}
else
{
p = p_Copy(p, currRing);
}
}
pNext
#define pNext(p)
Definition monomials.h:36
pGetCoeff
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition monomials.h:44
p_LmInit
static poly p_LmInit(poly p, const ring r)
Definition p_polys.h:1356

## Delete()

KINLINE void sTObject::Delete | ( |  | ) |

Definition at line 199 of file kInline.h.

{
if (t_p != NULL)
{
p_Delete(&t_p, tailRing);
if (p != NULL)
p_LmFree(p, currRing);
}
else
{
p_Delete(&p, currRing);
}
}
p_Delete
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:903
p_LmFree
static void p_LmFree(poly p, ring)
Definition p_polys.h:685

## GetLm() [1/2]

KINLINE void sTObject::GetLm | ( | poly & | p,
|  | ring & | r ) const

Definition at line 274 of file kInline.h.

{
if (t_p != NULL)
{
p_r = t_p;
r_r = tailRing;
}
else
{
p_r = p;
r_r = currRing;
}
}

## GetLm() [2/2]

KINLINE poly sTObject::GetLm | ( | ring | r | ) |

Definition at line 262 of file kInline.h.

{
assume(r == tailRing || r == currRing);
if (r == currRing)
return GetLmCurrRing();
if (t_p == NULL && p != NULL)
t_p = k_LmInit_currRing_2_tailRing(p, tailRing);
return t_p;
}
sTObject::GetLmCurrRing
KINLINE poly GetLmCurrRing()
Definition kInline.h:242
k_LmInit_currRing_2_tailRing
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin bin)
Definition kInline.h:959
assume
#define assume(x)
Definition mod2.h:389

## GetLmCurrRing()

KINLINE poly sTObject::GetLmCurrRing | ( |  | ) |

Definition at line 242 of file kInline.h.

{
if (p == NULL && t_p != NULL)
p = k_LmInit_tailRing_2_currRing(t_p, tailRing);
return p;
}

## GetLmTailRing()

KINLINE poly sTObject::GetLmTailRing | ( |  | ) |

Definition at line 249 of file kInline.h.

{
if (t_p == NULL)
{
if (p != NULL && tailRing != currRing)
{
t_p = k_LmInit_currRing_2_tailRing(p, tailRing);
return t_p;
}
return p;
}
return t_p;
}

## GetpFDeg()

KINLINE long sTObject::GetpFDeg | ( |  | ) | const

Definition at line 437 of file kInline.h.

{
assume(FDeg == this->pFDeg());
return FDeg;
}
sTObject::pFDeg
KINLINE long pFDeg() const
Definition kInline.h:422

## GetpLength()

KINLINE int sTObject::GetpLength | ( |  | ) |

Definition at line 293 of file kInline.h.

{
if (pLength <= 0) pLength = ::pLength(p != NULL ? p : t_p);
return pLength;
}

## Init()

KINLINE void sTObject::Init | ( | ring | r = currRing | ) |

Definition at line 110 of file kInline.h.

{
memset(this, 0, sizeof(sTObject));
i_r = -1;
Set(r);
}
sTObject::sTObject
KINLINE sTObject(ring tailRing=currRing)
Definition kInline.h:116
sTObject::i_r
int i_r
Definition kutil.h:82

## IsNull()

KINLINE BOOLEAN sTObject::IsNull | ( |  | ) | const

Definition at line 288 of file kInline.h.

{
return (p == NULL && t_p == NULL);
}

## LmDeleteAndIter()

KINLINE void sTObject::LmDeleteAndIter | ( |  | ) |

Definition at line 313 of file kInline.h.

{
assume(p != NULL || t_p != NULL);
if (t_p != NULL)
{
t_p = p_LmDeleteAndNext(t_p, tailRing);
if (p != NULL)
{
p_LmFree(p, currRing);
p = NULL;
}
}
else
{
p = p_LmDeleteAndNext(p, currRing);
}
is_normalized = FALSE;
}
p_LmDeleteAndNext
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition p_polys.h:757

## Mult_nn()

KINLINE void sTObject::Mult_nn | ( | number | n | ) |

Definition at line 334 of file kInline.h.

{
if (t_p != NULL)
{
t_p = p_Mult_nn(t_p, n, tailRing);
if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
}
else
{
p = p_Mult_nn(p, n, currRing, tailRing);
}
}
pSetCoeff0
#define pSetCoeff0(p, n)
Definition monomials.h:59
p_Mult_nn
static poly p_Mult_nn(poly p, number n, const ring r)
Definition p_polys.h:960

## Next()

KINLINE poly sTObject::Next | ( |  | ) |

Definition at line 305 of file kInline.h.

{
assume(p != NULL || t_p != NULL);
if (t_p != NULL) return pNext(t_p);
return pNext(p);
}

## pCleardenom()

KINLINE void sTObject::pCleardenom | ( |  | ) |

Definition at line 458 of file kInline.h.

{
assume(p != NULL);
BOOLEAN is_ring=rField_is_Ring(currRing);
if ((TEST_OPT_CONTENTSB) && (!is_ring))
{
number n;
if (t_p != NULL)
{
p_Cleardenom_n(t_p, tailRing, n);
pSetCoeff0(p, pGetCoeff(t_p));
}
else
{
p_Cleardenom_n(p, currRing, n);
}
if (!nIsOne(n))
{
denominator_list denom=(denominator_list)omAlloc(sizeof(denominator_list_s));
denom->n=nInvers(n);
denom->next=DENOMINATOR_LIST;
DENOMINATOR_LIST=denom;
}
nDelete(&n);
}
else if (is_ring)
{
number c;
if (t_p != NULL)
c=pGetCoeff(t_p);
else
c=pGetCoeff(p);
const coeffs C=tailRing->cf;
number u=n_GetUnit(c,C);
if (t_p != NULL)
{
if (!n_IsOne(u,C))
{
number uInv = n_Invers(u, C);
t_p=p_Mult_nn(t_p,uInv,tailRing);
n_Delete(&uInv,C);
}
if(!n_GreaterZero(pGetCoeff(t_p),tailRing->cf))
{
t_p = p_Neg(t_p,tailRing);
}
pSetCoeff0(p, pGetCoeff(t_p));
}
else
{
if (!n_IsOne(u,C))
{
number uInv = n_Invers(u, C);
p=p_Mult_nn(p,uInv,tailRing);
n_Delete(&uInv,C);
}
if(!n_GreaterZero(pGetCoeff(p),tailRing->cf))
{
p = p_Neg(p,tailRing);
}
}
n_Delete(&u,C);
}
else
{
if (t_p != NULL)
{
p_ProjectiveUnique(t_p, tailRing);
pSetCoeff0(p, pGetCoeff(t_p));
}
else
{
p_ProjectiveUnique(p, currRing);
}
}
}
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
n_Invers
static FORCE_INLINE number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
Definition coeffs.h:567
n_GreaterZero
static FORCE_INLINE BOOLEAN n_GreaterZero(number n, const coeffs r)
ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2),...
Definition coeffs.h:500
n_GetUnit
static FORCE_INLINE number n_GetUnit(number n, const coeffs r)
in Z: 1 in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that is co-prime with k i...
Definition coeffs.h:537
n_Delete
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition coeffs.h:461
n_IsOne
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
Definition coeffs.h:474
denominator_list
denominator_list_s * denominator_list
Definition kutil.h:64
DENOMINATOR_LIST
EXTERN_VAR denominator_list DENOMINATOR_LIST
Definition kutil.h:67
denominator_list_s::n
number n
Definition kutil.h:66
denominator_list_s::next
denominator_list next
Definition kutil.h:66
nDelete
#define nDelete(n)
Definition numbers.h:16
nInvers
#define nInvers(a)
Definition numbers.h:33
nIsOne
#define nIsOne(n)
Definition numbers.h:25
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
TEST_OPT_CONTENTSB
#define TEST_OPT_CONTENTSB
Definition options.h:129
p_Cleardenom_n
void p_Cleardenom_n(poly ph, const ring r, number &c)
Definition p_polys.cc:3002
p_ProjectiveUnique
void p_ProjectiveUnique(poly ph, const ring r)
Definition p_polys.cc:3191
p_Neg
static poly p_Neg(poly p, const ring r)
Definition p_polys.h:1114
rField_is_Ring
#define rField_is_Ring(R)
Definition ring.h:491

## pContent()

KINLINE void sTObject::pContent | ( |  | ) |

Definition at line 536 of file kInline.h.

{
assume(p != NULL);
if (t_p != NULL)
{
p_SimpleContent(t_p, 1, tailRing);
if (!n_GreaterZero(pGetCoeff(t_p),tailRing->cf))
{
t_p=p_Neg (t_p,tailRing);
}
pSetCoeff0(p, pGetCoeff(t_p));
}
else
{
p_SimpleContent(p, 1, currRing);
if (!n_GreaterZero(pGetCoeff(p),currRing->cf))
{
p=p_Neg (p,currRing);
}
}
}
p_SimpleContent
void p_SimpleContent(poly ph, int smax, const ring r)
Definition p_polys.cc:2612

## pFDeg()

KINLINE long sTObject::pFDeg | ( |  | ) | const

Definition at line 422 of file kInline.h.

{
if (p != NULL) return p_FDeg(p, currRing);
return tailRing->pFDeg(t_p, tailRing);
}
p_FDeg
static long p_FDeg(const poly p, const ring r)
Definition p_polys.h:382

## pLDeg()

KINLINE long sTObject::pLDeg | ( |  | ) |

Definition at line 442 of file kInline.h.

{
return tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
}
sTObject::GetLmTailRing
KINLINE poly GetLmTailRing()
Definition kInline.h:249

## pNorm()

KINLINE void sTObject::pNorm | ( |  | ) |

Definition at line 558 of file kInline.h.

{
assume(p != NULL);
if (! is_normalized)
{
p_Norm(p, currRing);
if (t_p != NULL)
pSetCoeff0(t_p, pGetCoeff(p));
is_normalized = TRUE;
}
}
TRUE
#define TRUE
Definition auxiliary.h:101
p_Norm
void p_Norm(poly p1, const ring r)
Definition p_polys.cc:3844

## pTotalDeg()

KINLINE long sTObject::pTotalDeg | ( |  | ) | const

Definition at line 427 of file kInline.h.

{
if (p != NULL) return p_Totaldegree(p, currRing);
return p_Totaldegree(t_p,tailRing);
}
p_Totaldegree
static long p_Totaldegree(poly p, const ring r)
Definition p_polys.h:1528

## Set() [1/3]

KINLINE void sTObject::Set | ( | poly | p_in,
|  | ring | c_r,
|  | ring | t_r )

Definition at line 151 of file kInline.h.

{
if (c_r != t_r)
{
assume(c_r == currRing && t_r == tailRing);
#ifdef HAVE_SHIFTBBA
if (c_r->isLPring)
{
shift = si_max(p_mFirstVblock(p_in, c_r) - 1, 0);
if (!shift) p_Test(p_in, currRing);
}
else
#endif
{
p_Test(p_in, currRing);
}
p = p_in;
pLength=::pLength(p_in);
}
else
{
Set(p_in, c_r);
}
}
si_max
static int si_max(const int a, const int b)
Definition auxiliary.h:125
sTObject::shift
int shift
Definition kutil.h:85
p_Test
#define p_Test(p, r)
Definition p_polys.h:161
p_mFirstVblock
int p_mFirstVblock(poly p, const ring ri)
Definition shiftop.cc:478

## Set() [2/3]

KINLINE void sTObject::Set | ( | poly | p_in,
|  | ring | r = currRing )

Definition at line 120 of file kInline.h.

{
#ifdef HAVE_SHIFTBBA
if (r->isLPring)
{
shift = si_max(p_mFirstVblock(p_in, r) - 1, 0);
if (!shift) p_Test(p_in, r);
}
else
#endif
{
p_Test(p_in, r);
}
if (r != currRing)
{
assume(r == tailRing);
t_p = p_in;
}
else
{
p = p_in;
}
pLength=::pLength(p_in);
}

## Set() [3/3]

KINLINE void sTObject::Set | ( | ring | r = currRing | ) |

Definition at line 106 of file kInline.h.

{
tailRing = r;
}

## SetDegStuffReturnLDeg()

KINLINE long sTObject::SetDegStuffReturnLDeg | ( |  | ) |

Definition at line 446 of file kInline.h.

{
FDeg = this->pFDeg();
long d = this->pLDeg();
ecart = d - FDeg;
return d;
}
sTObject::pLDeg
KINLINE long pLDeg()
Definition kInline.h:442

## SetLmCurrRing()

KINLINE void sTObject::SetLmCurrRing | ( |  | ) |

Definition at line 299 of file kInline.h.

{
if (p == NULL && t_p != NULL)
p = k_LmInit_tailRing_2_currRing(t_p, tailRing);
}

## SetpFDeg()

KINLINE long sTObject::SetpFDeg | ( |  | ) |

Definition at line 432 of file kInline.h.

{
FDeg = this->pFDeg();
return FDeg;
}

## ShallowCopyDelete()

KINLINE void sTObject::ShallowCopyDelete | ( | ring | new_tailRing,
|  | omBin | new_tailBin,
|  | pShallowCopyDeleteProc | p_shallow_copy_delete,
|  | BOOLEAN | set_max = TRUE )

Definition at line 381 of file kInline.h.

{
if (new_tailBin == NULL) new_tailBin = new_tailRing->PolyBin;
if (t_p != NULL)
{
t_p = p_shallow_copy_delete(t_p, tailRing, new_tailRing, new_tailBin);
if (p != NULL)
pNext(p) = pNext(t_p);
if (new_tailRing == currRing)
{
if (p == NULL) p = t_p;
else p_LmFree(t_p, tailRing);
t_p = NULL;
}
}
else if (p != NULL) /* && t_p==NULL */
{
if (pNext(p) != NULL)
{
pNext(p) = p_shallow_copy_delete(pNext(p),
tailRing, new_tailRing, new_tailBin);
}
if (new_tailRing != currRing)
{
t_p = k_LmInit_currRing_2_tailRing(p, new_tailRing);
pNext(t_p) = pNext(p);
}
}
if (max_exp != NULL)
{
max_exp = p_shallow_copy_delete(max_exp,tailRing,new_tailRing,new_tailBin);
}
else if (set_max && pNext(t_p) != NULL)
{
max_exp = p_GetMaxExpP(pNext(t_p), new_tailRing);
}
tailRing = new_tailRing;
}
sTObject::max_exp
poly max_exp
Definition kutil.h:76
p_GetMaxExpP
poly p_GetMaxExpP(poly p, const ring r)
return monomial r such that GetExp(r,i) is maximum of all monomials in p; coeff == 0,...
Definition p_polys.cc:1139

## wrp()

void sTObject::wrp | ( |  | ) |

Definition at line 757 of file kutil.cc.

{
if (t_p != NULL) p_wrp(t_p, tailRing);
else if (p != NULL) p_wrp(p, currRing, tailRing);
else ::wrp(NULL);
}
p_wrp
void p_wrp(poly p, ring lmRing, ring tailRing)
Definition polys0.cc:373

## Field Documentation

## ecart

int sTObject::ecart

Definition at line 79 of file kutil.h.

## FDeg

long sTObject::FDeg

Definition at line 78 of file kutil.h.

## i_r

int sTObject::i_r

Definition at line 82 of file kutil.h.

## is_normalized

char sTObject::is_normalized

Definition at line 88 of file kutil.h.

## is_redundant

char sTObject::is_redundant

Definition at line 94 of file kutil.h.

## is_sigsafe

char sTObject::is_sigsafe

Definition at line 99 of file kutil.h.

## is_special

char sTObject::is_special

Definition at line 103 of file kutil.h.

## length

int sTObject::length

Definition at line 80 of file kutil.h.

## max_exp

poly sTObject::max_exp

Definition at line 76 of file kutil.h.

## p

poly sTObject::p

Definition at line 74 of file kutil.h.

## pLength

int sTObject::pLength

Definition at line 81 of file kutil.h.

## sevSig

unsigned long sTObject::sevSig

Definition at line 72 of file kutil.h.

## shift

int sTObject::shift

Definition at line 85 of file kutil.h.

## sig

poly sTObject::sig

Definition at line 73 of file kutil.h.

## t_p

poly sTObject::t_p

Definition at line 75 of file kutil.h.

## tailRing

ring sTObject::tailRing

Definition at line 77 of file kutil.h.

The documentation for this class was generated from the following files:

- kernel/GBEngine/kutil.h
- kernel/GBEngine/kInline.h
- kernel/GBEngine/kutil.cc