Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
nc.h File Reference
#include "polys/monomials/ring.h"
#include "polys/kbuckets.h"
#include "polys/matpol.h"

Go to the source code of this file.

Data Structures

struct  nc_pProcs
 
struct  nc_struct
 

Macros

#define UPMATELEM(i, j, nVar)   ( (nVar * ((i)-1) - ((i) * ((i)-1))/2 + (j)-1)-(i) )
 

Typedefs

typedef poly(* mm_Mult_p_Proc_Ptr) (const poly m, poly p, const ring r)
 
typedef poly(* mm_Mult_pp_Proc_Ptr) (const poly m, const poly p, const ring r)
 
typedef poly(* SPoly_Proc_Ptr) (const poly p1, const poly p2, const ring r)
 
typedef poly(* SPolyReduce_Proc_Ptr) (const poly p1, poly p2, const ring r)
 
typedef void(* bucket_Proc_Ptr) (kBucket_pt b, poly p, number *c)
 

Enumerations

enum  nc_type {
  nc_error = -1, nc_general = 0, nc_skew, nc_comm,
  nc_lie, nc_undef, nc_exterior
}
 

Functions

matrix nc_PrintMat (int a, int b, ring r, int metric)
 returns matrix with the info on noncomm multiplication More...
 
BOOLEAN rIsLikeOpposite (ring rBase, ring rCandidate)
 checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so More...
 
void nc_rKill (ring r)
 complete destructor More...
 
BOOLEAN nc_CheckSubalgebra (poly PolyVar, ring r)
 
static nc_struct *& GetNC (ring r)
 
static nc_typencRingType (nc_struct *p)
 
static nc_type ncRingType (ring r)
 
static void ncRingType (ring r, nc_type t)
 
static void ncRingType (nc_struct *p, nc_type t)
 
static bool rIsSCA (const ring r)
 
poly _nc_p_Mult_q (poly p, poly q, const ring r)
 general NC-multiplication with destruction More...
 
poly _nc_pp_Mult_qq (const poly p, const poly q, const ring r)
 general NC-multiplication without destruction More...
 
poly nc_p_Minus_mm_Mult_qq (poly p, const poly m, const poly q, int &lp, const poly, const ring r)
 for p_Minus_mm_Mult_qq in pInline2.h More...
 
poly nc_p_Plus_mm_Mult_qq (poly p, const poly m, const poly q, int &lp, const int, const ring r)
 
static poly nc_mm_Mult_pp (const poly m, const poly p, const ring r)
 
static poly nc_mm_Mult_p (const poly m, poly p, const ring r)
 
static poly nc_CreateSpoly (const poly p1, const poly p2, const ring r)
 
poly nc_CreateShortSpoly (poly p1, poly p2, const ring r)
 
poly nc_p_Bracket_qq (poly p, const poly q, const ring r)
 returns [p,q], destroys p More...
 
static poly nc_ReduceSpoly (const poly p1, poly p2, const ring r)
 
void nc_PolyPolyRed (poly &b, poly p, number *c, const ring r)
 
static void nc_kBucketPolyRed (kBucket_pt b, poly p, number *c)
 
static void nc_BucketPolyRed_Z (kBucket_pt b, poly p, number *c)
 
poly nc_pSubst (poly p, int n, poly e, const ring r)
 substitute the n-th variable by e in p destroy p e is not a constant More...
 
BOOLEAN nc_CallPlural (matrix cc, matrix dd, poly cn, poly dn, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring=false)
 returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type, DO NOT initialize multiplication but call for it at the end checks the ordering condition and evtl. NDC NOTE: all the data belong to the curr, we change r which may be the same ring, and must have the same representation! More...
 
bool nc_SetupQuotient (ring rGR, const ring rG=NULL, bool bCopy=false)
 
BOOLEAN nc_rComplete (const ring src, ring dest, bool bSetupQuotient=true)
 
bool nc_rCopy (ring res, const ring r, bool bSetupQuotient)
 
poly pOppose (ring Rop_src, poly p, const ring Rop_dst)
 opposes a vector p from Rop to currRing (dst!) More...
 
ideal idOppose (ring Rop_src, ideal I, const ring Rop_dst)
 opposes a module I from Rop to currRing(dst) More...
 
int & getNCExtensions ()
 
int setNCExtensions (int iMask)
 
bool ncExtensions (int iMask)
 
void nc_p_ProcsSet (ring rGR, p_Procs_s *p_Procs)
 
static poly GetC (const ring r, int i, int j)
 
static poly GetD (const ring r, int i, int j)
 

Variables

const int GENERICMASK = 0x000
 
const int SCAMASK = 0x001
 
const int NOPLURALMASK = 0x002
 
const int NOFORMULAMASK =0x004
 
const int NOCACHEMASK = 0x008
 
const int TESTSYZSCAMASK = 0x0100 | SCAMASK
 

Data Structure Documentation

◆ nc_pProcs

struct nc_pProcs

Definition at line 55 of file nc.h.

Data Fields
bucket_Proc_Ptr BucketPolyRed
bucket_Proc_Ptr BucketPolyRed_Z
void * GB From "gb_hack.h".
mm_Mult_p_Proc_Ptr mm_Mult_p
mm_Mult_pp_Proc_Ptr mm_Mult_pp
SPolyReduce_Proc_Ptr ReduceSPoly
SPoly_Proc_Ptr SPoly

Macro Definition Documentation

◆ UPMATELEM

#define UPMATELEM (   i,
  j,
  nVar 
)    ( (nVar * ((i)-1) - ((i) * ((i)-1))/2 + (j)-1)-(i) )

Definition at line 36 of file nc.h.

Typedef Documentation

◆ bucket_Proc_Ptr

typedef void(* bucket_Proc_Ptr) (kBucket_pt b, poly p, number *c)

Definition at line 53 of file nc.h.

◆ mm_Mult_p_Proc_Ptr

typedef poly(* mm_Mult_p_Proc_Ptr) (const poly m, poly p, const ring r)

Definition at line 45 of file nc.h.

◆ mm_Mult_pp_Proc_Ptr

typedef poly(* mm_Mult_pp_Proc_Ptr) (const poly m, const poly p, const ring r)

Definition at line 46 of file nc.h.

◆ SPoly_Proc_Ptr

typedef poly(* SPoly_Proc_Ptr) (const poly p1, const poly p2, const ring r)

Definition at line 50 of file nc.h.

◆ SPolyReduce_Proc_Ptr

typedef poly(* SPolyReduce_Proc_Ptr) (const poly p1, poly p2, const ring r)

Definition at line 51 of file nc.h.

Enumeration Type Documentation

◆ nc_type

enum nc_type
Enumerator
nc_error 
nc_general 
nc_skew 
nc_comm 
nc_lie 
nc_undef 
nc_exterior 

Definition at line 12 of file nc.h.

13 {
14  nc_error = -1, // Something's gone wrong!
15  nc_general = 0, /* yx=q xy+... */
16  nc_skew, /*1*/ /* yx=q xy */
17  nc_comm, /*2*/ /* yx= xy */
18  nc_lie, /*3*/ /* yx=xy+... */
19  nc_undef, /*4*/ /* for internal reasons */
20 
21  nc_exterior /*5*/ // Exterior Algebra(SCA): yx= -xy & (!:) x^2 = 0
22 };
Definition: nc.h:17
Definition: nc.h:14
Definition: nc.h:19
Definition: nc.h:16
Definition: nc.h:21
Definition: nc.h:15
Definition: nc.h:18

Function Documentation

◆ _nc_p_Mult_q()

poly _nc_p_Mult_q ( poly  p,
poly  q,
const ring  r 
)

general NC-multiplication with destruction

Definition at line 215 of file old.gring.cc.

216 {
217  assume( rIsPluralRing(rRing) );
218 #ifdef PDEBUG
219  p_Test(pPolyP, rRing);
220  p_Test(pPolyQ, rRing);
221 #endif
222 #ifdef RDEBUG
223  rTest(rRing);
224 #endif
225 
226  int lp, lq;
227 
228  pqLength(pPolyP, pPolyQ, lp, lq, MIN_LENGTH_BUCKET);
229 
230  bool bUsePolynomial = TEST_OPT_NOT_BUCKETS || (si_max(lp, lq) < MIN_LENGTH_BUCKET); // ???
231 
232  CPolynomialSummator sum(rRing, bUsePolynomial);
233 
234  if (lq <= lp) // ?
235  {
236  // always length(q) times "p * q[j]"
237  for( ; pPolyQ!=NULL; pPolyQ = p_LmDeleteAndNext( pPolyQ, rRing ) )
238  sum += pp_Mult_mm( pPolyP, pPolyQ, rRing);
239 
240  p_Delete( &pPolyP, rRing );
241  } else
242  {
243  // always length(p) times "p[i] * q"
244  for( ; pPolyP!=NULL; pPolyP = p_LmDeleteAndNext( pPolyP, rRing ) )
245  sum += nc_mm_Mult_pp( pPolyP, pPolyQ, rRing);
246 
247  p_Delete( &pPolyQ, rRing );
248  }
249 
250  return(sum);
251 }
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:725
#define MIN_LENGTH_BUCKET
Definition: p_Mult_q.h:21
static poly pp_Mult_mm(poly p, poly m, const ring r)
Definition: p_polys.h:987
#define TEST_OPT_NOT_BUCKETS
Definition: options.h:104
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
#define rTest(r)
Definition: ring.h:777
static int si_max(const int a, const int b)
Definition: auxiliary.h:138
BOOLEAN pqLength(poly p, poly q, int &lp, int &lq, const int min)
Definition: p_Mult_q.cc:29
#define p_Test(p, r)
Definition: p_polys.h:163
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:857
#define NULL
Definition: omList.c:10
Definition: lq.h:39
static poly nc_mm_Mult_pp(const poly m, const poly p, const ring r)
Definition: nc.h:232
CPolynomialSummator: unifies bucket and polynomial summation as the later is brocken in buckets :(...
Definition: summator.h:20

◆ _nc_pp_Mult_qq()

poly _nc_pp_Mult_qq ( const poly  p,
const poly  q,
const ring  r 
)

general NC-multiplication without destruction

Definition at line 254 of file old.gring.cc.

255 {
256  assume( rIsPluralRing(rRing) );
257 #ifdef PDEBUG
258  p_Test(pPolyP, rRing);
259  p_Test(pPolyQ, rRing);
260 #endif
261 #ifdef RDEBUG
262  rTest(rRing);
263 #endif
264 
265  int lp, lq;
266 
267  pqLength(pPolyP, pPolyQ, lp, lq, MIN_LENGTH_BUCKET);
268 
269  bool bUsePolynomial = TEST_OPT_NOT_BUCKETS || (si_max(lp, lq) < MIN_LENGTH_BUCKET); // ???
270 
271  CPolynomialSummator sum(rRing, bUsePolynomial);
272 
273  if (lq <= lp) // ?
274  {
275  // always length(q) times "p * q[j]"
276  for( poly q = pPolyQ; q !=NULL; q = pNext(q) )
277  sum += pp_Mult_mm(pPolyP, q, rRing);
278  } else
279  {
280  // always length(p) times "p[i] * q"
281  for( poly p = pPolyP; p !=NULL; p = pNext(p) )
282  sum += nc_mm_Mult_pp( p, pPolyQ, rRing);
283  }
284 
285  return(sum);
286 }
#define MIN_LENGTH_BUCKET
Definition: p_Mult_q.h:21
static poly pp_Mult_mm(poly p, poly m, const ring r)
Definition: p_polys.h:987
#define TEST_OPT_NOT_BUCKETS
Definition: options.h:104
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
#define rTest(r)
Definition: ring.h:777
static int si_max(const int a, const int b)
Definition: auxiliary.h:138
BOOLEAN pqLength(poly p, poly q, int &lp, int &lq, const int min)
Definition: p_Mult_q.cc:29
#define p_Test(p, r)
Definition: p_polys.h:163
#define NULL
Definition: omList.c:10
#define pNext(p)
Definition: monomials.h:43
Definition: lq.h:39
static poly nc_mm_Mult_pp(const poly m, const poly p, const ring r)
Definition: nc.h:232
int p
Definition: cfModGcd.cc:4019
CPolynomialSummator: unifies bucket and polynomial summation as the later is brocken in buckets :(...
Definition: summator.h:20

◆ GetC()

static poly GetC ( const ring  r,
int  i,
int  j 
)
inlinestatic

Definition at line 375 of file nc.h.

376 {
377  assume(r!= NULL && rIsPluralRing(r));
378  const matrix C = GetNC(r)->C;
379  assume(C != NULL);
380  const int ncols = C->ncols;
381  assume( (i > 0) && (i < j) && (j <= ncols) );
382  return ( C->m[ncols * ((i)-1) + (j)-1] );
383 }
int j
Definition: facHensel.cc:105
int ncols
Definition: matpol.h:21
static nc_struct *& GetNC(ring r)
Definition: nc.h:162
poly * m
Definition: matpol.h:18
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
int i
Definition: cfEzgcd.cc:125
#define NULL
Definition: omList.c:10
int int ncols
Definition: cf_linsys.cc:32
matrix C
Definition: nc.h:83

◆ GetD()

static poly GetD ( const ring  r,
int  i,
int  j 
)
inlinestatic

Definition at line 386 of file nc.h.

387 {
388  assume(r!= NULL && rIsPluralRing(r));
389  const matrix D = GetNC(r)->D;
390  assume(D != NULL);
391  const int ncols = D->ncols;
392  assume( (i > 0) && (i < j) && (j <= ncols) );
393  return ( D->m[ncols * ((i)-1) + (j)-1] );
394 }
int j
Definition: facHensel.cc:105
#define D(A)
Definition: gentable.cc:129
int ncols
Definition: matpol.h:21
static nc_struct *& GetNC(ring r)
Definition: nc.h:162
poly * m
Definition: matpol.h:18
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
int i
Definition: cfEzgcd.cc:125
#define NULL
Definition: omList.c:10
matrix D
Definition: nc.h:84
int int ncols
Definition: cf_linsys.cc:32

◆ GetNC()

static nc_struct*& GetNC ( ring  r)
inlinestatic

Definition at line 162 of file nc.h.

163 {
164  return r->GetNC();
165 }

◆ getNCExtensions()

int& getNCExtensions ( )

Definition at line 82 of file old.gring.cc.

83 {
84  return (iNCExtensions);
85 }
int iNCExtensions
Definition: old.gring.cc:80

◆ idOppose()

ideal idOppose ( ring  Rop_src,
ideal  I,
const ring  Rop_dst 
)

opposes a module I from Rop to currRing(dst)

Definition at line 3406 of file old.gring.cc.

3407 {
3408  /* the simplest case:*/
3409  if ( Rop == dst ) return id_Copy(I, dst);
3410 
3411  /* check Rop == rOpposite(currRing) */
3412  if (!rIsLikeOpposite(dst, Rop))
3413  {
3414  WarnS("an opposite ring should be used");
3415  return NULL;
3416  }
3417  int i;
3418  ideal idOp = idInit(I->ncols, I->rank);
3419  for (i=0; i< (I->ncols)*(I->nrows); i++)
3420  {
3421  idOp->m[i] = pOppose(Rop,I->m[i], dst);
3422  }
3423  id_Test(idOp, dst);
3424  return idOp;
3425 }
ideal id_Copy(ideal h1, const ring r)
copy an ideal
#define id_Test(A, lR)
Definition: simpleideals.h:80
poly pOppose(ring Rop, poly p, const ring dst)
opposes a vector p from Rop to currRing (dst!)
Definition: old.gring.cc:3367
#define WarnS
Definition: emacs.cc:78
BOOLEAN rIsLikeOpposite(ring rBase, ring rCandidate)
checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so ...
Definition: old.gring.cc:3340
int i
Definition: cfEzgcd.cc:125
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:37
#define NULL
Definition: omList.c:10

◆ nc_BucketPolyRed_Z()

static void nc_BucketPolyRed_Z ( kBucket_pt  b,
poly  p,
number *  c 
)
inlinestatic

Definition at line 295 of file nc.h.

296 {
297  const ring r = b->bucket_ring;
298  assume(rIsPluralRing(r));
299 
300 // return gnc_kBucketPolyRed_ZNew(b, p, c);
301 
302  assume(r->GetNC()->p_Procs.BucketPolyRed_Z!=NULL);
303  return r->GetNC()->p_Procs.BucketPolyRed_Z(b, p, c);
304 
305 }
ring bucket_ring
Definition: kbuckets.h:189
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
#define NULL
Definition: omList.c:10
int p
Definition: cfModGcd.cc:4019

◆ nc_CallPlural()

BOOLEAN nc_CallPlural ( matrix  cc,
matrix  dd,
poly  cn,
poly  dn,
ring  r,
bool  bSetupQuotient,
bool  bCopyInput,
bool  bBeQuiet,
ring  curr,
bool  dummy_ring = false 
)

returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type, DO NOT initialize multiplication but call for it at the end checks the ordering condition and evtl. NDC NOTE: all the data belong to the curr, we change r which may be the same ring, and must have the same representation!

Definition at line 2681 of file old.gring.cc.

2686 {
2687  assume( r != NULL );
2688  assume( curr != NULL );
2689 
2690  if( !bSetupQuotient)
2691  assume( (r->qideal == NULL) ); // The basering must NOT be a qring!??
2692 
2693  assume( rSamePolyRep(r, curr) || bCopyInput ); // wrong assumption?
2694 
2695 
2696  if( r->N == 1 ) // clearly commutative!!!
2697  {
2698  assume(
2699  ( (CCC != NULL) && (MATCOLS(CCC) == 1) && (MATROWS(CCC) == 1) && (MATELEM(CCC,1,1) == NULL) ) ||
2700  ( (CCN == NULL) )
2701  );
2702 
2703  assume(
2704  ( (DDD != NULL) && (MATCOLS(DDD) == 1) && (MATROWS(DDD) == 1) && (MATELEM(DDD,1,1) == NULL) ) ||
2705  ( (DDN == NULL) )
2706  );
2707  if(!dummy_ring)
2708  {
2709  WarnS("commutative ring with 1 variable");
2710  return FALSE;
2711  }
2712  }
2713 
2714  // there must be:
2715  assume( (CCC != NULL) != (CCN != NULL) ); // exactly one data about coeffs (C).
2716  assume( !((DDD != NULL) && (DDN != NULL)) ); // at most one data about tails (D).
2717 
2718 // ring save = currRing;
2719 // if( save != curr )
2720 // rChangeCurrRing(curr);
2721 
2722 
2723 #if OUTPUT
2724  if( CCC != NULL )
2725  {
2726  PrintS("nc_CallPlural(), Input data, CCC: \n");
2727  iiWriteMatrix(CCC, "C", 2, curr, 4);
2728  }
2729  if( DDD != NULL )
2730  {
2731  PrintS("nc_CallPlural(), Input data, DDD: \n");
2732  iiWriteMatrix(DDD, "D", 2, curr, 4);
2733  }
2734 #endif
2735 
2736 
2737 #ifndef SING_NDEBUG
2738  if (CCC!=NULL) id_Test((ideal)CCC, curr);
2739  if (DDD!=NULL) id_Test((ideal)DDD, curr);
2740  p_Test(CCN, curr);
2741  p_Test(DDN, curr);
2742 #endif
2743 
2744  if( (!bBeQuiet) && (r->GetNC() != NULL) )
2745  WarnS("going to redefine the algebra structure");
2746 
2747 // if( currRing != r )
2748 // rChangeCurrRing(r);
2749 
2750  matrix CC = NULL;
2751  poly CN = NULL;
2752  matrix C; bool bCnew = false;
2753 
2754  matrix DD = NULL;
2755  poly DN = NULL;
2756  matrix D; bool bDnew = false;
2757 
2758  number nN, pN, qN;
2759 
2760  bool IsSkewConstant = false, tmpIsSkewConstant;
2761  int i, j;
2762 
2763  nc_type nctype = nc_undef;
2764 
2765  //////////////////////////////////////////////////////////////////
2766  // check the correctness of arguments, without any real chagnes!!!
2767 
2768 
2769 
2770  // check C
2771  if ((CCC != NULL) && ( (MATCOLS(CCC)==1) || MATROWS(CCC)==1 ) )
2772  {
2773  CN = MATELEM(CCC,1,1);
2774  }
2775  else
2776  {
2777  if ((CCC != NULL) && ( (MATCOLS(CCC)!=r->N) || (MATROWS(CCC)!=r->N) ))
2778  {
2779  Werror("Square %d x %d matrix expected", r->N, r->N);
2780 
2781 // if( currRing != save )
2782 // rChangeCurrRing(save);
2783  return TRUE;
2784  }
2785  }
2786  if (( CCC != NULL) && (CC == NULL)) CC = CCC; // mp_Copy(CCC, ?); // bug!?
2787  if (( CCN != NULL) && (CN == NULL)) CN = CCN;
2788 
2789  // check D
2790  if ((DDD != NULL) && ( (MATCOLS(DDD)==1) || MATROWS(DDD)==1 ) )
2791  {
2792  DN = MATELEM(DDD,1,1);
2793  }
2794  else
2795  {
2796  if ((DDD != NULL) && ( (MATCOLS(DDD)!=r->N) || (MATROWS(DDD)!=r->N) ))
2797  {
2798  Werror("Square %d x %d matrix expected",r->N,r->N);
2799 
2800 // if( currRing != save )
2801 // rChangeCurrRing(save);
2802  return TRUE;
2803  }
2804  }
2805 
2806  if (( DDD != NULL) && (DD == NULL)) DD = DDD; // mp_Copy(DDD, ?); // ???
2807  if (( DDN != NULL) && (DN == NULL)) DN = DDN;
2808 
2809  // further checks and some analysis:
2810  // all data in 'curr'!
2811  if (CN != NULL) /* create matrix C = CN * Id */
2812  {
2813  if (!p_IsConstant(CN,curr))
2814  {
2815  WerrorS("Incorrect input : non-constants are not allowed as coefficients (first argument)");
2816  return TRUE;
2817  }
2818  assume(p_IsConstant(CN,curr));
2819 
2820  nN = pGetCoeff(CN);
2821  if (n_IsZero(nN, curr->cf))
2822  {
2823  WerrorS("Incorrect input : zero coefficients are not allowed");
2824 
2825 // if( currRing != save )
2826 // rChangeCurrRing(save);
2827  return TRUE;
2828  }
2829 
2830  if (n_IsOne(nN, curr->cf))
2831  nctype = nc_lie;
2832  else
2833  nctype = nc_general;
2834 
2835  IsSkewConstant = true;
2836 
2837  C = mpNew(r->N,r->N); // ring independent!
2838  bCnew = true;
2839 
2840  for(i=1; i<r->N; i++)
2841  for(j=i+1; j<=r->N; j++)
2842  MATELEM(C,i,j) = prCopyR_NoSort(CN, curr, r); // nc_p_CopyPut(CN, r); // copy CN from curr into r
2843 
2844 #ifndef SING_NDEBUG
2845  id_Test((ideal)C, r);
2846 #endif
2847 
2848  } else
2849  if ( (CN == NULL) && (CC != NULL) ) /* copy matrix C */
2850  {
2851  /* analyze C */
2852 
2853  BOOLEAN pN_set=FALSE;
2854  pN = n_Init(0,curr->cf);
2855 
2856  if( r->N > 1 )
2857  if ( MATELEM(CC,1,2) != NULL )
2858  {
2859  if (!pN_set) n_Delete(&pN,curr->cf); // free initial nInit(0)
2860  pN = p_GetCoeff(MATELEM(CC,1,2), curr);
2861  pN_set=TRUE;
2862  }
2863 
2864  tmpIsSkewConstant = true;
2865 
2866  for(i=1; i<r->N; i++)
2867  for(j=i+1; j<=r->N; j++)
2868  {
2869  if (MATELEM(CC,i,j) == NULL)
2870  qN = NULL;
2871  else
2872  {
2873  if (!p_IsConstant(MATELEM(CC,i,j),curr))
2874  {
2875  Werror("Incorrect input : non-constants are not allowed as coefficients (first argument at [%d, %d])", i, j);
2876  return TRUE;
2877  }
2878  assume(p_IsConstant(MATELEM(CC,i,j),curr));
2879  qN = p_GetCoeff(MATELEM(CC,i,j),curr);
2880  }
2881 
2882 
2883  if ( qN == NULL ) /* check the consistency: Cij!=0 */
2884  // find also illegal pN
2885  {
2886  WerrorS("Incorrect input : matrix of coefficients contains zeros in the upper triangle");
2887 
2888 // if( currRing != save )
2889 // rChangeCurrRing(save);
2890  return TRUE;
2891  }
2892 
2893  if (!n_Equal(pN, qN, curr->cf)) tmpIsSkewConstant = false;
2894  }
2895 
2896  if( bCopyInput )
2897  {
2898  C = mp_Copy(CC, curr, r); // Copy C into r!!!???
2899 #ifndef SING_NDEBUG
2900  id_Test((ideal)C, r);
2901 #endif
2902  bCnew = true;
2903  }
2904  else
2905  C = CC;
2906 
2907  IsSkewConstant = tmpIsSkewConstant;
2908 
2909  if ( tmpIsSkewConstant && n_IsOne(pN, curr->cf) )
2910  nctype = nc_lie;
2911  else
2912  nctype = nc_general;
2913  if (!pN_set) n_Delete(&pN,curr->cf); // free initial nInit(0)
2914  }
2915 
2916  /* initialition of the matrix D */
2917  if ( DD == NULL ) /* we treat DN only (it could also be NULL) */
2918  {
2919  D = mpNew(r->N,r->N); bDnew = true;
2920 
2921  if (DN == NULL)
2922  {
2923  if ( (nctype == nc_lie) || (nctype == nc_undef) )
2924  nctype = nc_comm; /* it was nc_skew earlier */
2925  else /* nc_general, nc_skew */
2926  nctype = nc_skew;
2927  }
2928  else /* DN != NULL */
2929  for(i=1; i<r->N; i++)
2930  for(j=i+1; j<=r->N; j++)
2931  MATELEM(D,i,j) = prCopyR_NoSort(DN, curr, r); // project DN into r->GetNC()->basering!
2932 #ifndef SING_NDEBUG
2933  id_Test((ideal)D, r);
2934 #endif
2935  }
2936  else /* DD != NULL */
2937  {
2938  bool b = true; // DD == null ?
2939 
2940  for(int i = 1; (i < r->N) && b; i++)
2941  for(int j = i+1; (j <= r->N) && b; j++)
2942  if (MATELEM(DD, i, j) != NULL)
2943  {
2944  b = false;
2945  break;
2946  }
2947 
2948  if (b) // D == NULL!!!
2949  {
2950  if ( (nctype == nc_lie) || (nctype == nc_undef) )
2951  nctype = nc_comm; /* it was nc_skew earlier */
2952  else /* nc_general, nc_skew */
2953  nctype = nc_skew;
2954  }
2955 
2956  if( bCopyInput )
2957  {
2958  D = mp_Copy(DD, curr, r); // Copy DD into r!!!
2959 #ifndef SING_NDEBUG
2960  id_Test((ideal)D, r);
2961 #endif
2962  bDnew = true;
2963  }
2964  else
2965  D = DD;
2966  }
2967 
2968  assume( C != NULL );
2969  assume( D != NULL );
2970 
2971 #if OUTPUT
2972  PrintS("nc_CallPlural(), Computed data, C: \n");
2973  iiWriteMatrix(C, "C", 2, r, 4);
2974 
2975  PrintS("nc_CallPlural(), Computed data, D: \n");
2976  iiWriteMatrix(D, "D", 2, r, 4);
2977 
2978  Print("\nTemporary: type = %d, IsSkewConstant = %d\n", nctype, IsSkewConstant);
2979 #endif
2980 
2981 
2982  // check the ordering condition for D (both matrix and poly cases):
2983  if ( gnc_CheckOrdCondition(D, r) )
2984  {
2985  if( bCnew ) mp_Delete( &C, r );
2986  if( bDnew ) mp_Delete( &D, r );
2987 
2988  WerrorS("Matrix of polynomials violates the ordering condition");
2989 
2990 // if( currRing != save )
2991 // rChangeCurrRing(save);
2992  return TRUE;
2993  }
2994 
2995  // okay now we are ready for this!!!
2996 
2997  // create new non-commutative structure
2998  nc_struct *nc_new = (nc_struct *)omAlloc0(sizeof(nc_struct));
2999 
3000  ncRingType(nc_new, nctype);
3001 
3002  nc_new->C = C; // if C and D were given by matrices at the beginning they are in r
3003  nc_new->D = D; // otherwise they should be in r->GetNC()->basering(polynomial * Id_{N})
3004 
3005  nc_new->IsSkewConstant = (IsSkewConstant?1:0);
3006 
3007  // Setup new NC structure!!!
3008  if (r->GetNC() != NULL)
3009  {
3010 #ifndef SING_NDEBUG
3011  WarnS("Changing the NC-structure of an existing NC-ring!!!");
3012 #endif
3013  nc_rKill(r);
3014  }
3015 
3016  r->GetNC() = nc_new;
3017 
3018  r->ext_ref=NULL;
3019 
3020 // if( currRing != save )
3021 // rChangeCurrRing(save);
3022 
3023  return gnc_InitMultiplication(r, bSetupQuotient);
3024 }
int j
Definition: facHensel.cc:105
#define D(A)
Definition: gentable.cc:129
poly prCopyR_NoSort(poly p, ring src_r, ring dest_r)
Definition: prCopy.cc:77
#define Print
Definition: emacs.cc:80
void nc_rKill(ring r)
complete destructor
Definition: old.gring.cc:2474
#define FALSE
Definition: auxiliary.h:94
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff &#39;n&#39; represents the one element.
Definition: coeffs.h:469
#define id_Test(A, lR)
Definition: simpleideals.h:80
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition: coeffs.h:539
#define TRUE
Definition: auxiliary.h:98
void WerrorS(const char *s)
Definition: feFopen.cc:24
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
#define WarnS
Definition: emacs.cc:78
Definition: nc.h:75
nc_type
Definition: nc.h:12
Definition: nc.h:17
void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces)
set spaces to zero by default
Definition: matpol.cc:734
CanonicalForm b
Definition: cfModGcd.cc:4044
#define assume(x)
Definition: mod2.h:390
static BOOLEAN p_IsConstant(const poly p, const ring r)
Definition: p_polys.h:1923
Definition: nc.h:19
BOOLEAN rSamePolyRep(ring r1, ring r2)
returns TRUE, if r1 and r2 represents the monomials in the same way FALSE, otherwise this is an analo...
Definition: ring.cc:1668
BOOLEAN gnc_InitMultiplication(ring r, bool bSetupQuotient=false)
Definition: old.gring.cc:3040
int i
Definition: cfEzgcd.cc:125
Definition: nc.h:16
void PrintS(const char *s)
Definition: reporter.cc:284
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff &#39;n&#39; represents the zero element.
Definition: coeffs.h:465
void mp_Delete(matrix *a, const ring r)
Definition: matpol.cc:780
#define p_Test(p, r)
Definition: p_polys.h:163
matrix mpNew(int r, int c)
create a r x c zero-matrix
Definition: matpol.cc:36
BOOLEAN gnc_CheckOrdCondition(matrix D, ring r)
Definition: old.gring.cc:2626
#define MATCOLS(i)
Definition: matpol.h:27
#define NULL
Definition: omList.c:10
Definition: nc.h:15
matrix D
Definition: nc.h:84
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff &#39;a&#39; and &#39;b&#39; represent the same number; they may have different representations.
Definition: coeffs.h:461
#define p_GetCoeff(p, r)
Definition: monomials.h:57
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
Definition: matpol.cc:63
static nc_type & ncRingType(nc_struct *p)
Definition: nc.h:167
matrix C
Definition: nc.h:83
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:456
#define MATROWS(i)
Definition: matpol.h:26
int IsSkewConstant
Definition: nc.h:93
int BOOLEAN
Definition: auxiliary.h:85
void Werror(const char *fmt,...)
Definition: reporter.cc:189
#define omAlloc0(size)
Definition: omAllocDecl.h:211
Definition: nc.h:18
#define MATELEM(mat, i, j)
Definition: matpol.h:28

◆ nc_CheckSubalgebra()

BOOLEAN nc_CheckSubalgebra ( poly  PolyVar,
ring  r 
)

Definition at line 2567 of file old.gring.cc.

2568 {
2569 // ring save = currRing;
2570 // int WeChangeRing = 0;
2571 // if (currRing != r)
2572 // rChangeCurrRing(r);
2573 // WeChangeRing = 1;
2574 // }
2575  int rN=r->N;
2576  int *ExpVar=(int*)omAlloc0((rN+1)*sizeof(int));
2577  int *ExpTmp=(int*)omAlloc0((rN+1)*sizeof(int));
2578  p_GetExpV(PolyVar, ExpVar, r);
2579  int i; int j; int k;
2580  poly test=NULL;
2581  int OK=1;
2582  for (i=1; i<rN; i++)
2583  {
2584  if (ExpVar[i]==0) /* i.e. not in PolyVar */
2585  {
2586  for (j=i+1; j<=rN; j++)
2587  {
2588  if (ExpVar[j]==0)
2589  {
2590  test = MATELEM(r->GetNC()->D,i,j);
2591  while (test!=NULL)
2592  {
2593  p_GetExpV(test, ExpTmp, r);
2594  OK=1;
2595  for (k=1;k<=rN;k++)
2596  {
2597  if (ExpTmp[k]!=0)
2598  {
2599  if (ExpVar[k]!=0) OK=0;
2600  }
2601  }
2602  if (!OK)
2603  {
2604 // if ( WeChangeRing )
2605 // rChangeCurrRing(save);
2606  return(TRUE);
2607  }
2608  pIter(test);
2609  }
2610  }
2611  }
2612  }
2613  }
2614  freeT(ExpVar,rN);
2615  freeT(ExpTmp,rN);
2616 // if ( WeChangeRing )
2617 // rChangeCurrRing(save);
2618  return(FALSE);
2619 }
int j
Definition: facHensel.cc:105
#define FALSE
Definition: auxiliary.h:94
static void p_GetExpV(poly p, int *ev, const ring r)
Definition: p_polys.h:1466
#define TRUE
Definition: auxiliary.h:98
int k
Definition: cfEzgcd.cc:92
#define pIter(p)
Definition: monomials.h:44
int i
Definition: cfEzgcd.cc:125
CanonicalForm test
Definition: cfModGcd.cc:4037
#define NULL
Definition: omList.c:10
#define freeT(A, v)
Definition: old.gring.cc:101
#define omAlloc0(size)
Definition: omAllocDecl.h:211
#define MATELEM(mat, i, j)
Definition: matpol.h:28

◆ nc_CreateShortSpoly()

poly nc_CreateShortSpoly ( poly  p1,
poly  p2,
const ring  r 
)

Definition at line 1878 of file old.gring.cc.

1879 {
1880 #ifdef PDEBUG
1881  p_Test(p1, r);
1882  p_Test(p2, r);
1883 #endif
1884 
1885  const long lCompP1 = p_GetComp(p1,r);
1886  const long lCompP2 = p_GetComp(p2,r);
1887 
1888  if ((lCompP1!=lCompP2) && (lCompP1!=0) && (lCompP2!=0))
1889  {
1890 #ifdef PDEBUG
1891  WerrorS("nc_CreateShortSpoly: wrong module components!"); // !!!!
1892 #endif
1893  return(NULL);
1894  }
1895 
1896  poly m;
1897 
1898 #ifdef HAVE_RATGRING
1899  if ( rIsRatGRing(r))
1900  {
1901  /* rational version */
1902  m = p_LcmRat(p1, p2, si_max(lCompP1, lCompP2), r);
1903  } else
1904 #endif
1905  {
1906  m = p_Lcm(p1, p2, r);
1907  }
1908 
1909  pSetCoeff0(m,NULL);
1910 
1911  return(m);
1912 }
#define p_GetComp(p, r)
Definition: monomials.h:71
static BOOLEAN rIsRatGRing(const ring r)
Definition: ring.h:415
void p_Lcm(const poly a, const poly b, poly m, const ring r)
Definition: p_polys.cc:1602
void WerrorS(const char *s)
Definition: feFopen.cc:24
poly p_LcmRat(const poly a, const poly b, const long lCompM, const ring r)
Definition: p_polys.cc:1624
int m
Definition: cfEzgcd.cc:121
static int si_max(const int a, const int b)
Definition: auxiliary.h:138
#define p_Test(p, r)
Definition: p_polys.h:163
#define NULL
Definition: omList.c:10
#define pSetCoeff0(p, n)
Definition: monomials.h:66

◆ nc_CreateSpoly()

static poly nc_CreateSpoly ( const poly  p1,
const poly  p2,
const ring  r 
)
inlinestatic

Definition at line 250 of file nc.h.

251 {
252  assume(rIsPluralRing(r));
253  assume(r->GetNC()->p_Procs.SPoly!=NULL);
254  return r->GetNC()->p_Procs.SPoly(p1, p2, r);
255 }
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
#define NULL
Definition: omList.c:10

◆ nc_kBucketPolyRed()

static void nc_kBucketPolyRed ( kBucket_pt  b,
poly  p,
number *  c 
)
inlinestatic

Definition at line 284 of file nc.h.

285 {
286  const ring r = b->bucket_ring;
287  assume(rIsPluralRing(r));
288 
289 // return gnc_kBucketPolyRedNew(b, p, c);
290 
291  assume(r->GetNC()->p_Procs.BucketPolyRed!=NULL);
292  return r->GetNC()->p_Procs.BucketPolyRed(b, p, c);
293 }
ring bucket_ring
Definition: kbuckets.h:189
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
#define NULL
Definition: omList.c:10
int p
Definition: cfModGcd.cc:4019

◆ nc_mm_Mult_p()

static poly nc_mm_Mult_p ( const poly  m,
poly  p,
const ring  r 
)
inlinestatic

Definition at line 242 of file nc.h.

243 {
244  assume(rIsPluralRing(r));
245  assume(r->GetNC()->p_Procs.mm_Mult_p!=NULL);
246  return r->GetNC()->p_Procs.mm_Mult_p(m, p, r);
247 // return p_Mult_mm( p, m, r);
248 }
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
int m
Definition: cfEzgcd.cc:121
#define NULL
Definition: omList.c:10
int p
Definition: cfModGcd.cc:4019

◆ nc_mm_Mult_pp()

static poly nc_mm_Mult_pp ( const poly  m,
const poly  p,
const ring  r 
)
inlinestatic

Definition at line 232 of file nc.h.

233 {
234  assume(rIsPluralRing(r));
235  assume(r->GetNC()->p_Procs.mm_Mult_pp!=NULL);
236  return r->GetNC()->p_Procs.mm_Mult_pp(m, p, r);
237 // return pp_Mult_mm( p, m, r);
238 }
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
int m
Definition: cfEzgcd.cc:121
#define NULL
Definition: omList.c:10
int p
Definition: cfModGcd.cc:4019

◆ nc_p_Bracket_qq()

poly nc_p_Bracket_qq ( poly  p,
const poly  q,
const ring  r 
)

returns [p,q], destroys p

Definition at line 2242 of file old.gring.cc.

2243 {
2244  assume(p != NULL && q!= NULL);
2245 
2246  if (!rIsPluralRing(r)) return(NULL);
2247  if (p_ComparePolys(p,q, r)) return(NULL);
2248  /* Components !? */
2249  poly Q=NULL;
2250  number coef=NULL;
2251  poly pres=NULL;
2252  int UseBuckets=1;
2253  if (((pLength(p)< MIN_LENGTH_BUCKET/2) && (pLength(q)< MIN_LENGTH_BUCKET/2))
2255  UseBuckets=0;
2256 
2257 
2258  CPolynomialSummator sum(r, UseBuckets == 0);
2259 
2260  while (p!=NULL)
2261  {
2262  Q=q;
2263  while(Q!=NULL)
2264  {
2265  pres=nc_mm_Bracket_nn(p,Q, r); /* since no coeffs are taken into account there */
2266  if (pres!=NULL)
2267  {
2268  coef = n_Mult(pGetCoeff(p),pGetCoeff(Q), r->cf);
2269  pres = __p_Mult_nn(pres,coef,r);
2270 
2271  sum += pres;
2272  n_Delete(&coef, r->cf);
2273  }
2274  pIter(Q);
2275  }
2276  p=p_LmDeleteAndNext(p, r);
2277  }
2278  return(sum);
2279 }
poly nc_mm_Bracket_nn(poly m1, poly m2, const ring r)
returns [m1,m2] for two monoms, destroys nothing without coeffs
Definition: old.gring.cc:2283
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:725
BOOLEAN p_ComparePolys(poly p1, poly p2, const ring r)
returns TRUE if p1 is a skalar multiple of p2 assume p1 != NULL and p2 != NULL
Definition: p_polys.cc:4460
#define MIN_LENGTH_BUCKET
Definition: p_Mult_q.h:21
#define Q
Definition: sirandom.c:25
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
#define TEST_OPT_NOT_BUCKETS
Definition: options.h:104
#define pIter(p)
Definition: monomials.h:44
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of &#39;a&#39; and &#39;b&#39;, i.e., a*b
Definition: coeffs.h:637
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
static unsigned pLength(poly a)
Definition: p_polys.h:192
#define __p_Mult_nn(p, n, r)
Definition: p_polys.h:927
#define NULL
Definition: omList.c:10
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:456
int p
Definition: cfModGcd.cc:4019
CPolynomialSummator: unifies bucket and polynomial summation as the later is brocken in buckets :(...
Definition: summator.h:20

◆ nc_p_Minus_mm_Mult_qq()

poly nc_p_Minus_mm_Mult_qq ( poly  p,
const poly  m,
const poly  q,
int &  lp,
const poly  ,
const ring  r 
)

for p_Minus_mm_Mult_qq in pInline2.h

Definition at line 150 of file old.gring.cc.

152 {
153  poly mc = p_Neg( p_Copy(m, r), r );
154  poly mmc = nc_mm_Mult_pp( mc, q, r );
155  p_Delete(&mc, r);
156 
157  int org_p=pLength(p);
158  int org_q=pLength(q);
159 
160  p = p_Add_q(p, mmc, r);
161 
162  shorter = pLength(p)-org_p-org_q; // ring independent!
163 
164  return(p);
165 }
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:812
int m
Definition: cfEzgcd.cc:121
static unsigned pLength(poly a)
Definition: p_polys.h:192
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:857
static poly p_Neg(poly p, const ring r)
Definition: p_polys.h:1043
static poly nc_mm_Mult_pp(const poly m, const poly p, const ring r)
Definition: nc.h:232
int p
Definition: cfModGcd.cc:4019
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:892

◆ nc_p_Plus_mm_Mult_qq()

poly nc_p_Plus_mm_Mult_qq ( poly  p,
const poly  m,
const poly  q,
int &  lp,
const int  ,
const ring  r 
)

Definition at line 168 of file old.gring.cc.

170 {
171  p = p_Add_q(p, nc_mm_Mult_pp( m, q, r ), r);
172 
173  lp = pLength(p);
174 
175  return(p);
176 }
int m
Definition: cfEzgcd.cc:121
static unsigned pLength(poly a)
Definition: p_polys.h:192
static poly nc_mm_Mult_pp(const poly m, const poly p, const ring r)
Definition: nc.h:232
int p
Definition: cfModGcd.cc:4019
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:892

◆ nc_p_ProcsSet()

void nc_p_ProcsSet ( ring  rGR,
p_Procs_s p_Procs 
)

Definition at line 3204 of file old.gring.cc.

3205 {
3206  assume(rIsPluralRing(rGR));
3207  assume(p_Procs!=NULL);
3208 
3209  gnc_p_ProcsSet(rGR, p_Procs);
3210 
3211  if(rIsSCA(rGR) && ncExtensions(SCAMASK) )
3212  {
3213  sca_p_ProcsSet(rGR, p_Procs);
3214  }
3215 
3216  if( ncExtensions(NOPLURALMASK) )
3218 
3219  if(!rIsSCA(rGR) && !ncExtensions(NOFORMULAMASK))
3221 
3222 }
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
void sca_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
Definition: sca.cc:1225
#define NULL
Definition: omList.c:10
const int SCAMASK
Definition: nc.h:333
static bool rIsSCA(const ring r)
Definition: nc.h:198
BOOLEAN ncInitSpecialPairMultiplication(ring r)
Definition: ncSAMult.cc:265
const int NOPLURALMASK
Definition: nc.h:347
bool ncInitSpecialPowersMultiplication(ring r)
Definition: ncSAFormula.cc:50
static void gnc_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
Definition: old.gring.cc:3140
const int NOFORMULAMASK
Definition: nc.h:348
bool ncExtensions(int iMask)
Definition: old.gring.cc:94

◆ nc_PolyPolyRed()

void nc_PolyPolyRed ( poly &  b,
poly  p,
number *  c,
const ring  r 
)

Definition at line 2229 of file old.gring.cc.

2230 {
2231 #if 0
2232  nc_PolyPolyRedOld(b, p, c, r);
2233 #else
2234  nc_PolyPolyRedNew(b, p, c, r);
2235 #endif
2236 }
void nc_PolyPolyRedNew(poly &b, poly p, number *c, const ring r)
Definition: old.gring.cc:2129
CanonicalForm b
Definition: cfModGcd.cc:4044
void nc_PolyPolyRedOld(poly &b, poly p, number *c, const ring r)
Definition: old.gring.cc:2095
int p
Definition: cfModGcd.cc:4019

◆ nc_PrintMat()

matrix nc_PrintMat ( int  a,
int  b,
ring  r,
int  metric 
)

returns matrix with the info on noncomm multiplication

Definition at line 2393 of file old.gring.cc.

2394 {
2395 
2396  if ( (a==b) || !rIsPluralRing(r) ) return(NULL);
2397  int i;
2398  int j;
2399  if (a>b) {j=b; i=a;}
2400  else {j=a; i=b;}
2401  /* i<j */
2402  int rN=r->N;
2403  int size=r->GetNC()->MTsize[UPMATELEM(i,j,rN)];
2404  matrix M = r->GetNC()->MT[UPMATELEM(i,j,rN)];
2405  /* return(M); */
2406 /*
2407  int sizeofres;
2408  if (metric==0)
2409  {
2410  sizeofres=sizeof(int);
2411  }
2412  if (metric==1)
2413  {
2414  sizeofres=sizeof(number);
2415  }
2416 */
2417  matrix res=mpNew(size,size);
2418  int s;
2419  int t;
2420  int length;
2421  long totdeg;
2422  poly p;
2423  for(s=1;s<=size;s++)
2424  {
2425  for(t=1;t<=size;t++)
2426  {
2427  p=MATELEM(M,s,t);
2428  if (p==NULL)
2429  {
2430  MATELEM(res,s,t)=0;
2431  }
2432  else
2433  {
2434  length = pLength(p);
2435  if (metric==0) /* length */
2436  {
2437  MATELEM(res,s,t)= p_ISet(length,r);
2438  }
2439  else if (metric==1) /* sum of deg divided by the length */
2440  {
2441  totdeg=0;
2442  while (p!=NULL)
2443  {
2444  totdeg=totdeg+p_Deg(p,r);
2445  pIter(p);
2446  }
2447  number ntd = n_Init(totdeg, r->cf);
2448  number nln = n_Init(length, r->cf);
2449  number nres= n_Div(ntd,nln, r->cf);
2450  n_Delete(&ntd, r->cf);
2451  n_Delete(&nln, r->cf);
2452  MATELEM(res,s,t)=p_NSet(nres,r);
2453  }
2454  }
2455  }
2456  }
2457  return(res);
2458 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
int j
Definition: facHensel.cc:105
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
Definition: p_polys.cc:1435
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition: coeffs.h:539
#define pIter(p)
Definition: monomials.h:44
#define M
Definition: sirandom.c:24
CanonicalForm b
Definition: cfModGcd.cc:4044
long p_Deg(poly a, const ring r)
Definition: p_polys.cc:579
CanonicalForm res
Definition: facAbsFact.cc:64
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
int i
Definition: cfEzgcd.cc:125
static unsigned pLength(poly a)
Definition: p_polys.h:192
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
matrix mpNew(int r, int c)
create a r x c zero-matrix
Definition: matpol.cc:36
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of &#39;a&#39; and &#39;b&#39;, i.e., a/b; raises an error if &#39;b&#39; is not invertible in r exceptio...
Definition: coeffs.h:616
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:267
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:456
int p
Definition: cfModGcd.cc:4019
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
Definition: p_polys.cc:1289
#define UPMATELEM(i, j, nVar)
Definition: nc.h:36
#define MATELEM(mat, i, j)
Definition: matpol.h:28

◆ nc_pSubst()

poly nc_pSubst ( poly  p,
int  n,
poly  e,
const ring  r 
)

substitute the n-th variable by e in p destroy p e is not a constant

Definition at line 3228 of file old.gring.cc.

3229 {
3230  int rN = r->N;
3231  int *PRE = (int *)omAlloc0((rN+1)*sizeof(int));
3232  int *SUF = (int *)omAlloc0((rN+1)*sizeof(int));
3233  int i,pow;
3234  number C;
3235  poly suf,pre;
3236  poly res = NULL;
3237  poly out = NULL;
3238  while ( p!= NULL )
3239  {
3240  C = p_GetCoeff(p, r);
3241  p_GetExpV(p, PRE, r); /* faster splitting? */
3242  pow = PRE[n]; PRE[n]=0;
3243  res = NULL;
3244  if (pow!=0)
3245  {
3246  for (i=n+1; i<=rN; i++)
3247  {
3248  SUF[i] = PRE[i];
3249  PRE[i] = 0;
3250  }
3251  res = p_Power(p_Copy(e, r),pow, r);
3252  /* multiply with prefix */
3253  pre = p_One(r);
3254  p_SetExpV(pre,PRE, r);
3255  p_Setm(pre, r);
3256  res = nc_mm_Mult_p(pre,res, r);
3257  /* multiply with suffix */
3258  suf = p_One(r);
3259  p_SetExpV(suf,SUF, r);
3260  p_Setm(suf, r);
3261  res = p_Mult_mm(res,suf, r);
3262  res = __p_Mult_nn(res,C, r);
3263  p_SetComp(res,PRE[0], r);
3264  }
3265  else /* pow==0 */
3266  {
3267  res = p_Head(p, r);
3268  }
3269  p = p_LmDeleteAndNext(p, r);
3270  out = p_Add_q(out,res, r);
3271  }
3272  freeT(PRE,rN);
3273  freeT(SUF,rN);
3274  return(out);
3275 }
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:725
static poly p_Mult_mm(poly p, poly m, const ring r)
Definition: p_polys.h:997
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition: p_polys.h:247
static void p_GetExpV(poly p, int *ev, const ring r)
Definition: p_polys.h:1466
static void p_SetExpV(poly p, int *ev, const ring r)
Definition: p_polys.h:1481
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:812
static poly nc_mm_Mult_p(const poly m, poly p, const ring r)
Definition: nc.h:242
static poly p_Head(poly p, const ring r)
Definition: p_polys.h:825
CanonicalForm res
Definition: facAbsFact.cc:64
poly p_One(const ring r)
Definition: p_polys.cc:1305
int i
Definition: cfEzgcd.cc:125
#define __p_Mult_nn(p, n, r)
Definition: p_polys.h:927
#define NULL
Definition: omList.c:10
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:233
#define p_GetCoeff(p, r)
Definition: monomials.h:57
int p
Definition: cfModGcd.cc:4019
#define freeT(A, v)
Definition: old.gring.cc:101
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:892
Rational pow(const Rational &a, int e)
Definition: GMPrat.cc:414
poly p_Power(poly p, int i, const ring r)
Definition: p_polys.cc:2144
#define omAlloc0(size)
Definition: omAllocDecl.h:211

◆ nc_rComplete()

BOOLEAN nc_rComplete ( const ring  src,
ring  dest,
bool  bSetupQuotient = true 
)

Definition at line 5520 of file ring.cc.

5525 {
5526 // NOTE: Originally used only by idElimination to transfer NC structure to dest
5527 // ring created by dirty hack (without nc_CallPlural)
5528  rTest(src);
5529 
5530  assume(!rIsPluralRing(dest)); // destination must be a newly constructed commutative ring
5531 
5532  if (!rIsPluralRing(src))
5533  {
5534  return FALSE;
5535  }
5536 
5537  const int N = dest->N;
5538 
5539  assume(src->N == N);
5540 
5541 // ring save = currRing;
5542 
5543 // if (dest != save)
5544 // rChangeCurrRing(dest);
5545 
5546  const ring srcBase = src;
5547 
5548  assume( n_SetMap(srcBase->cf,dest->cf) == n_SetMap(dest->cf,dest->cf) ); // currRing is important here!
5549 
5550  matrix C = mpNew(N,N); // ring independent
5551  matrix D = mpNew(N,N);
5552 
5553  matrix C0 = src->GetNC()->C;
5554  matrix D0 = src->GetNC()->D;
5555 
5556  // map C and D into dest
5557  for (int i = 1; i < N; i++)
5558  {
5559  for (int j = i + 1; j <= N; j++)
5560  {
5561  const number n = n_Copy(p_GetCoeff(MATELEM(C0,i,j), srcBase), srcBase->cf); // src, mapping for coeffs into currRing = dest!
5562  const poly p = p_NSet(n, dest);
5563  MATELEM(C,i,j) = p;
5564  if (MATELEM(D0,i,j) != NULL)
5565  MATELEM(D,i,j) = prCopyR(MATELEM(D0,i,j), srcBase, dest); // ?
5566  }
5567  }
5568  /* One must test C and D _only_ in r->GetNC()->basering!!! not in r!!! */
5569 
5570  id_Test((ideal)C, dest);
5571  id_Test((ideal)D, dest);
5572 
5573  if (nc_CallPlural(C, D, NULL, NULL, dest, bSetupQuotient, false, true, dest)) // also takes care about quotient ideal
5574  {
5575  //WarnS("Error transferring non-commutative structure");
5576  // error message should be in the interpreter interface
5577 
5578  mp_Delete(&C, dest);
5579  mp_Delete(&D, dest);
5580 
5581 // if (currRing != save)
5582 // rChangeCurrRing(save);
5583 
5584  return TRUE;
5585  }
5586 
5587 // mp_Delete(&C, dest); // used by nc_CallPlural!
5588 // mp_Delete(&D, dest);
5589 
5590 // if (dest != save)
5591 // rChangeCurrRing(save);
5592 
5593  assume(rIsPluralRing(dest));
5594  return FALSE;
5595 }
int j
Definition: facHensel.cc:105
#define D(A)
Definition: gentable.cc:129
poly prCopyR(poly p, ring src_r, ring dest_r)
Definition: prCopy.cc:35
#define FALSE
Definition: auxiliary.h:94
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
Definition: p_polys.cc:1435
#define id_Test(A, lR)
Definition: simpleideals.h:80
#define TRUE
Definition: auxiliary.h:98
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:48
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
#define rTest(r)
Definition: ring.h:777
int i
Definition: cfEzgcd.cc:125
void mp_Delete(matrix *a, const ring r)
Definition: matpol.cc:780
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
Definition: coeffs.h:722
matrix mpNew(int r, int c)
create a r x c zero-matrix
Definition: matpol.cc:36
BOOLEAN nc_CallPlural(matrix cc, matrix dd, poly cn, poly dn, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring=false)
returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type...
Definition: old.gring.cc:2681
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of &#39;n&#39;
Definition: coeffs.h:452
#define p_GetCoeff(p, r)
Definition: monomials.h:57
int p
Definition: cfModGcd.cc:4019
#define MATELEM(mat, i, j)
Definition: matpol.h:28

◆ nc_rCopy()

bool nc_rCopy ( ring  res,
const ring  r,
bool  bSetupQuotient 
)

Definition at line 3028 of file old.gring.cc.

3029 {
3030  if (nc_CallPlural(r->GetNC()->C, r->GetNC()->D, NULL, NULL, res, bSetupQuotient, true, true, r))
3031  {
3032  WarnS("Error occurred while coping/setuping the NC structure!"); // No reaction!???
3033  return true; // error
3034  }
3035 
3036  return false;
3037 }
#define WarnS
Definition: emacs.cc:78
CanonicalForm res
Definition: facAbsFact.cc:64
BOOLEAN nc_CallPlural(matrix CCC, matrix DDD, poly CCN, poly DDN, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring)
returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type...
Definition: old.gring.cc:2681
#define NULL
Definition: omList.c:10

◆ nc_ReduceSpoly()

static poly nc_ReduceSpoly ( const poly  p1,
poly  p2,
const ring  r 
)
inlinestatic

Definition at line 263 of file nc.h.

264 {
265  assume(rIsPluralRing(r));
266  assume(r->GetNC()->p_Procs.ReduceSPoly!=NULL);
267 #ifdef PDEBUG
268 // assume(p_LmDivisibleBy(p1, p2, r));
269 #endif
270  return r->GetNC()->p_Procs.ReduceSPoly(p1, p2, r);
271 }
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
#define NULL
Definition: omList.c:10

◆ nc_rKill()

void nc_rKill ( ring  r)

complete destructor

Definition at line 2474 of file old.gring.cc.

2476 {
2477  if( r->GetNC()->GetGlobalMultiplier() != NULL )
2478  {
2479  delete r->GetNC()->GetGlobalMultiplier();
2480  r->GetNC()->GetGlobalMultiplier() = NULL;
2481  }
2482 
2483  if( r->GetNC()->GetFormulaPowerMultiplier() != NULL )
2484  {
2485  delete r->GetNC()->GetFormulaPowerMultiplier();
2486  r->GetNC()->GetFormulaPowerMultiplier() = NULL;
2487  }
2488 
2489 
2490  int i,j;
2491  int rN=r->N;
2492  if ( rN > 1 )
2493  {
2494  for(i=1;i<rN;i++)
2495  {
2496  for(j=i+1;j<=rN;j++)
2497  {
2498  id_Delete((ideal *)&(r->GetNC()->MT[UPMATELEM(i,j,rN)]),r);
2499  }
2500  }
2501  omFreeSize((ADDRESS)r->GetNC()->MT,rN*(rN-1)/2*sizeof(matrix));
2502  omFreeSize((ADDRESS)r->GetNC()->MTsize,rN*(rN-1)/2*sizeof(int));
2503  id_Delete((ideal *)&(r->GetNC()->COM),r);
2504  }
2505  id_Delete((ideal *)&(r->GetNC()->C),r);
2506  id_Delete((ideal *)&(r->GetNC()->D),r);
2507 
2508  if( rIsSCA(r) && (r->GetNC()->SCAQuotient() != NULL) )
2509  {
2510  id_Delete(&r->GetNC()->SCAQuotient(), r); // Custom SCA destructor!!!
2511  }
2512 
2513 
2514  nc_CleanUp(r);
2515 }
int j
Definition: facHensel.cc:105
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void * ADDRESS
Definition: auxiliary.h:133
void nc_CleanUp(nc_struct *p)
Definition: old.gring.cc:2460
int i
Definition: cfEzgcd.cc:125
#define NULL
Definition: omList.c:10
static bool rIsSCA(const ring r)
Definition: nc.h:198
#define UPMATELEM(i, j, nVar)
Definition: nc.h:36

◆ nc_SetupQuotient()

bool nc_SetupQuotient ( ring  rGR,
const ring  rG = NULL,
bool  bCopy = false 
)

Definition at line 3428 of file old.gring.cc.

3429 {
3430  if( rGR->qideal == NULL )
3431  return false; // no quotient = no work! done!? What about factors of SCA?
3432 
3433  bool ret = true;
3434  // currently only super-commutative extension deals with factors.
3435 
3436  if( ncExtensions(SCAMASK) )
3437  {
3438  bool sca_ret = sca_SetupQuotient(rGR, rG, bCopy);
3439 
3440  if(sca_ret) // yes it was dealt with!
3441  ret = false;
3442  }
3443 
3444  if( bCopy )
3445  {
3446  assume(rIsPluralRing(rGR) == rIsPluralRing(rG));
3447  assume((rGR->qideal==NULL) == (rG->qideal==NULL));
3448  assume(rIsSCA(rGR) == rIsSCA(rG));
3449  assume(ncRingType(rGR) == ncRingType(rG));
3450  }
3451 
3452  return ret;
3453 }
#define assume(x)
Definition: mod2.h:390
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
#define NULL
Definition: omList.c:10
bool sca_SetupQuotient(ring rGR, ring rG, bool bCopy)
Definition: sca.cc:911
const int SCAMASK
Definition: nc.h:333
static bool rIsSCA(const ring r)
Definition: nc.h:198
static nc_type & ncRingType(nc_struct *p)
Definition: nc.h:167
bool ncExtensions(int iMask)
Definition: old.gring.cc:94

◆ ncExtensions()

bool ncExtensions ( int  iMask)

Definition at line 94 of file old.gring.cc.

95 {
96  return ((getNCExtensions() & iMask) == iMask);
97 }
int & getNCExtensions()
Definition: old.gring.cc:82

◆ ncRingType() [1/4]

static nc_type& ncRingType ( nc_struct p)
inlinestatic

Definition at line 167 of file nc.h.

168 {
169  assume(p!=NULL);
170  return (p->ncRingType());
171 }
#define assume(x)
Definition: mod2.h:390
nc_type & ncRingType()
Definition: nc.h:116
#define NULL
Definition: omList.c:10

◆ ncRingType() [2/4]

static nc_type ncRingType ( ring  r)
inlinestatic

Definition at line 173 of file nc.h.

174 {
175  if(rIsPluralRing(r))
176  return (ncRingType(r->GetNC()));
177  else
178  return (nc_error);
179 }
Definition: nc.h:14
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
static nc_type & ncRingType(nc_struct *p)
Definition: nc.h:167

◆ ncRingType() [3/4]

static void ncRingType ( ring  r,
nc_type  t 
)
inlinestatic

Definition at line 181 of file nc.h.

182 {
183  assume((r != NULL) && (r->GetNC() != NULL));
184  ncRingType(r->GetNC()) = t;
185 }
#define assume(x)
Definition: mod2.h:390
#define NULL
Definition: omList.c:10
static nc_type & ncRingType(nc_struct *p)
Definition: nc.h:167

◆ ncRingType() [4/4]

static void ncRingType ( nc_struct p,
nc_type  t 
)
inlinestatic

Definition at line 187 of file nc.h.

188 {
189  assume(p!=NULL);
190  ncRingType(p) = t;
191 }
#define assume(x)
Definition: mod2.h:390
#define NULL
Definition: omList.c:10
static nc_type & ncRingType(nc_struct *p)
Definition: nc.h:167

◆ pOppose()

poly pOppose ( ring  Rop_src,
poly  p,
const ring  Rop_dst 
)

opposes a vector p from Rop to currRing (dst!)

Definition at line 3367 of file old.gring.cc.

3368 {
3369  /* the simplest case:*/
3370  if ( Rop == dst ) return(p_Copy(p, dst));
3371  /* check Rop == rOpposite(currRing) */
3372 
3373 
3374  if ( !rIsLikeOpposite(dst, Rop) )
3375  {
3376  WarnS("an opposite ring should be used");
3377  return NULL;
3378  }
3379 
3380  nMapFunc nMap = n_SetMap(Rop->cf, dst->cf); // reverse?
3381 
3382  /* nMapFunc nMap = nSetMap(Rop);*/
3383  /* since we know that basefields coinside! */
3384 
3385  // coinside???
3386 
3387  int *perm=(int *)omAlloc0((Rop->N+1)*sizeof(int));
3388  if (!p_IsConstantPoly(p, Rop))
3389  {
3390  /* we know perm exactly */
3391  int i;
3392  for(i=1; i<=Rop->N; i++)
3393  {
3394  perm[i] = Rop->N+1-i;
3395  }
3396  }
3397  poly res = p_PermPoly(p, perm, Rop, dst, nMap);
3398  omFreeSize((ADDRESS)perm,(Rop->N+1)*sizeof(int));
3399 
3400  p_Test(res, dst);
3401 
3402  return res;
3403 }
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
void * ADDRESS
Definition: auxiliary.h:133
#define WarnS
Definition: emacs.cc:78
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:812
BOOLEAN rIsLikeOpposite(ring rBase, ring rCandidate)
checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so ...
Definition: old.gring.cc:3340
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)
Definition: p_polys.cc:4014
CanonicalForm res
Definition: facAbsFact.cc:64
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition: coeffs.h:74
int i
Definition: cfEzgcd.cc:125
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
Definition: coeffs.h:722
#define p_Test(p, r)
Definition: p_polys.h:163
#define NULL
Definition: omList.c:10
static BOOLEAN p_IsConstantPoly(const poly p, const ring r)
Definition: p_polys.h:1937
int p
Definition: cfModGcd.cc:4019
#define omAlloc0(size)
Definition: omAllocDecl.h:211

◆ rIsLikeOpposite()

BOOLEAN rIsLikeOpposite ( ring  rBase,
ring  rCandidate 
)

checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so

Definition at line 3340 of file old.gring.cc.

3341 {
3342  /* the same basefield */
3343  int diagnose = TRUE;
3344  nMapFunc nMap = n_SetMap(rCandidate->cf, rBase->cf); // reverse?
3345 
3346 ////// if (nMap != nCopy) diagnose = FALSE;
3347  if (nMap == NULL) diagnose = FALSE;
3348 
3349 
3350  /* same number of variables */
3351  if (rBase->N != rCandidate->N) diagnose = FALSE;
3352  /* nc and comm ring */
3353  if ( rIsPluralRing(rBase) != rIsPluralRing(rCandidate) ) diagnose = FALSE;
3354  /* both are qrings */
3355  /* NO CHECK, since it is used in building opposite qring */
3356  /* if ( ((rBase->qideal != NULL) && (rCandidate->qideal == NULL)) */
3357  /* || ((rBase->qideal == NULL) && (rCandidate->qideal != NULL)) ) */
3358  /* diagnose = FALSE; */
3359  /* TODO: varnames are e->E etc */
3360  return diagnose;
3361 }
#define FALSE
Definition: auxiliary.h:94
#define TRUE
Definition: auxiliary.h:98
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition: coeffs.h:74
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
Definition: coeffs.h:722
#define NULL
Definition: omList.c:10

◆ rIsSCA()

static bool rIsSCA ( const ring  r)
inlinestatic

Definition at line 198 of file nc.h.

199 {
200 #ifdef HAVE_PLURAL
201  return rIsPluralRing(r) && (ncRingType(r) == nc_exterior);
202 #else
203  return false;
204 #endif
205 }
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
Definition: nc.h:21
static nc_type & ncRingType(nc_struct *p)
Definition: nc.h:167

◆ setNCExtensions()

int setNCExtensions ( int  iMask)

Definition at line 87 of file old.gring.cc.

88 {
89  const int iOld = getNCExtensions();
90  getNCExtensions() = iMask;
91  return (iOld);
92 }
int & getNCExtensions()
Definition: old.gring.cc:82

Variable Documentation

◆ GENERICMASK

const int GENERICMASK = 0x000

Definition at line 332 of file nc.h.

◆ NOCACHEMASK

const int NOCACHEMASK = 0x008

Definition at line 349 of file nc.h.

◆ NOFORMULAMASK

const int NOFORMULAMASK =0x004

Definition at line 348 of file nc.h.

◆ NOPLURALMASK

const int NOPLURALMASK = 0x002

Definition at line 347 of file nc.h.

◆ SCAMASK

const int SCAMASK = 0x001

Definition at line 333 of file nc.h.

◆ TESTSYZSCAMASK

const int TESTSYZSCAMASK = 0x0100 | SCAMASK

Definition at line 351 of file nc.h.