source: git/kernel/polys.cc @ 85fd90

spielwiese
Last change on this file since 85fd90 was 85fd90, checked in by Burcin Erocal <burcin@…>, 13 years ago
Fix rChangeCurrRing and make the interpreter pass precision info to real/complex coeffs constructor.
  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[737a68]1#include "mod2.h"
2
3#include <omalloc/omalloc.h>
4#include <misc/auxiliary.h>
[a8516a]5#include <misc/options.h>
[737a68]6
7#include "polys.h"
8
[929fae]9ring  currRing = NULL;
10ideal currQuotient = NULL;
[737a68]11
[85fd90]12/* -------------------------------------------------------- */
13/*2
14* change all global variables to fit the description of the new ring
15*/
16
17void p_SetGlobals(const ring r, BOOLEAN complete)
18{
19// // //  if (r->ppNoether!=NULL) p_Delete(&r->ppNoether,r); // ???
20
21  if (complete)
22  {
23    test &= ~ TEST_RINGDEP_OPTS;
24    test |= r->options;
25  }
26}
27
[737a68]28void rChangeCurrRing(ring r)
29{
[ae133b]30   currRing = r;
31   currQuotient = r->qideal;
[85fd90]32   //------------ global variables related to coefficients ------------
33   nSetChar(r->cf);
34   //------------ global variables related to polys -------------------
35   p_SetGlobals(r);
36}
37/*
38
39/// internally changes the gloabl ring and resets the relevant
40/// global variables:
41/// SHOULD BE DEPRECATED NOW...?
42void rChangeCurrRing(ring r)
43{
44 // if (!rMinpolyIsNULL(currRing))
45 // {
46 //   omCheckAddr(currRing->cf->minpoly);
47 // }
48  //------------ set global ring vars --------------------------------
49  //currRing = r;
50  //currQuotient=NULL;
51  if (r != NULL)
52  {
53    rTest(r);
54    //------------ set global ring vars --------------------------------
55    //currQuotient=r->qideal;
56
57    //------------ global variables related to coefficients ------------
58    nSetChar(r->cf);
59
60    //------------ global variables related to polys -------------------
61    p_SetGlobals(r);
62    //------------ global variables related to factory -----------------
63  }
[737a68]64}
[85fd90]65*/
Note: See TracBrowser for help on using the repository browser.