spielwiese
Last change
on this file since e12050 was
e12050,
checked in by Oleksandr Motsak <motsak@…>, 12 years ago
|
fixing bugs due to rChangeCurrRing(0)
TODO: why all of this was commented out???!
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[762407] | 1 | #include "config.h" |
---|
[737a68] | 2 | #include "mod2.h" |
---|
| 3 | |
---|
| 4 | #include <omalloc/omalloc.h> |
---|
| 5 | #include <misc/auxiliary.h> |
---|
[a8516a] | 6 | #include <misc/options.h> |
---|
[737a68] | 7 | |
---|
| 8 | #include "polys.h" |
---|
| 9 | |
---|
[929fae] | 10 | ring currRing = NULL; |
---|
| 11 | ideal currQuotient = NULL; |
---|
[737a68] | 12 | |
---|
| 13 | void rChangeCurrRing(ring r) |
---|
| 14 | { |
---|
[e12050] | 15 | if( r != NULL ) |
---|
| 16 | { |
---|
| 17 | rTest(r); |
---|
| 18 | |
---|
| 19 | //------------ set global ring vars -------------------------------- |
---|
| 20 | currRing = r; |
---|
| 21 | currQuotient = r->qideal; |
---|
| 22 | //------------ global variables related to coefficients ------------ |
---|
| 23 | assume( r->cf!= NULL ); |
---|
| 24 | nSetChar(r->cf); |
---|
| 25 | //------------ global variables related to polys |
---|
| 26 | p_SetGlobals(r); |
---|
| 27 | //------------ global variables related to factory ----------------- |
---|
| 28 | } else |
---|
| 29 | { |
---|
| 30 | currRing = NULL; |
---|
| 31 | currQuotient = NULL; |
---|
| 32 | } |
---|
[85fd90] | 33 | } |
---|
| 34 | /* |
---|
| 35 | /// internally changes the gloabl ring and resets the relevant |
---|
| 36 | /// global variables: |
---|
| 37 | /// SHOULD BE DEPRECATED NOW...? |
---|
| 38 | void rChangeCurrRing(ring r) |
---|
| 39 | { |
---|
| 40 | // if (!rMinpolyIsNULL(currRing)) |
---|
| 41 | // { |
---|
| 42 | // omCheckAddr(currRing->cf->minpoly); |
---|
| 43 | // } |
---|
| 44 | //------------ set global ring vars -------------------------------- |
---|
| 45 | //currRing = r; |
---|
| 46 | //currQuotient=NULL; |
---|
| 47 | if (r != NULL) |
---|
| 48 | { |
---|
| 49 | rTest(r); |
---|
| 50 | //------------ set global ring vars -------------------------------- |
---|
| 51 | //currQuotient=r->qideal; |
---|
| 52 | |
---|
| 53 | //------------ global variables related to coefficients ------------ |
---|
| 54 | nSetChar(r->cf); |
---|
| 55 | |
---|
| 56 | //------------ global variables related to polys ------------------- |
---|
| 57 | p_SetGlobals(r); |
---|
| 58 | //------------ global variables related to factory ----------------- |
---|
| 59 | } |
---|
[737a68] | 60 | } |
---|
[85fd90] | 61 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.