source: git/kernel/polys.cc @ d56ad87

spielwiese
Last change on this file since d56ad87 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
Line 
1#include "mod2.h"
2
3#include <omalloc/omalloc.h>
4#include <misc/auxiliary.h>
5#include <misc/options.h>
6
7#include "polys.h"
8
9ring  currRing = NULL;
10ideal currQuotient = NULL;
11
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
28void rChangeCurrRing(ring r)
29{
30   currRing = r;
31   currQuotient = r->qideal;
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  }
64}
65*/
Note: See TracBrowser for help on using the repository browser.