Changeset 85d8bee in git


Ignore:
Timestamp:
Jun 18, 2010, 5:57:47 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
e5ffec70440370de33da3fa2773669fe8e35d684
Parents:
8e124676cbdd85ab8774665bf2a182e8c34b5450
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-06-18 17:57:47+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:14+01:00
Message:
HAVE_RING fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • coeffs/rintegers.cc

    r8e12467 r85d8bee  
    88
    99#include <string.h>
    10 #include <kernel/mod2.h>
    11 #include <omalloc/mylimits.h>
    12 #include <kernel/structs.h>
    13 #include <kernel/febase.h>
    14 #include <omalloc/omalloc.h>
    15 #include <kernel/numbers.h>
    16 #include <kernel/longrat.h>
    17 #include <kernel/mpr_complex.h>
    18 #include <kernel/ring.h>
    19 #include <kernel/rintegers.h>
    20 #include <kernel/si_gmp.h>
     10#include <auxiliary.h>
     11#include <mylimits.h>
     12#include "coeffs.h"
     13#include <reporter.h>
     14#include <omalloc.h>
     15#include "numbers.h"
     16#include "longrat.h"
     17#include "mpr_complex.h"
     18#include "rintegers.h"
     19#include <si_gmp.h>
    2120
    2221#ifdef HAVE_RINGS
     
    3837 * Give the smallest non unit k, such that a * x = k = b * y has a solution
    3938 */
    40 number nrzLcm (number a,number b,ring r)
     39number nrzLcm (number a,number b,const coeffs r)
    4140{
    4241  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    5049 * a solution.
    5150 */
    52 number nrzGcd (number a,number b,ring r)
     51number nrzGcd (number a,number b,const coeffs r)
    5352{
    5453  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    8786 * create a number from int
    8887 */
    89 number nrzInit (int i, const ring r)
     88number nrzInit (int i, const coeffs r)
    9089{
    9190  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    9493}
    9594
    96 void nrzDelete(number *a, const ring r)
     95void nrzDelete(number *a, const coeffs r)
    9796{
    9897  if (*a == NULL) return;
     
    102101}
    103102
    104 number nrzCopy(number a)
     103number nrzCopy(number a, const coeffs r)
    105104{
    106105  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    109108}
    110109
    111 number cfrzCopy(number a, const ring r)
    112 {
    113   return nrzCopy(a);
     110number nrzCopyMap(number a, const coeffs src, const coeffs dst)
     111{
     112  return nrzCopy(a,dst);
    114113}
    115114
     
    123122 * convert a number to int
    124123 */
    125 int nrzInt(number &n, const ring r)
     124int nrzInt(number &n, const coeffs r)
    126125{
    127126  return (int) mpz_get_si( (int_number)n);
     
    144143}
    145144
    146 number  nrzGetUnit (number a)
    147 {
    148   return nrzInit(1, currRing);
     145number  nrzGetUnit (number a, const coeffs r)
     146{
     147  return nrzInit(1, r);
    149148}
    150149
     
    253252}
    254253
    255 number nrzMapMachineInt(number from)
     254number nrzMapMachineInt(number from, const coeffs src, const coeffs dst)
    256255{
    257256  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    260259}
    261260
    262 number nrzMapZp(number from)
     261number nrzMapZp(number from, const coeffs src, const coeffs dst)
    263262{
    264263  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    267266}
    268267
    269 number nrzMapQ(number from)
     268number nrzMapQ(number from, const coeffs src, const coeffs dst)
    270269{
    271270  int_number erg = (int_number) omAllocBin(gmp_nrz_bin);
     
    275274}
    276275
    277 nMapFunc nrzSetMap(const ring src, const ring dst)
     276nMapFunc nrzSetMap(const coeffs src, const coeffs dst)
    278277{
    279278  /* dst = currRing */
    280   if (rField_is_Ring_Z(src) || rField_is_Ring_ModN(src) || rField_is_Ring_PtoM(src))
    281   {
    282     return nrzCopy;
    283   }
    284   if (rField_is_Ring_2toM(src))
     279  if (nField_is_Ring_Z(src) || nField_is_Ring_ModN(src) || nField_is_Ring_PtoM(src))
     280  {
     281    return nrzCopyMap;
     282  }
     283  if (nField_is_Ring_2toM(src))
    285284  {
    286285    return nrzMapMachineInt;
    287286  }
    288   if (rField_is_Zp(src))
     287  if (nField_is_Zp(src))
    289288  {
    290289    return nrzMapZp;
    291290  }
    292   if (rField_is_Q(src))
     291  if (nField_is_Q(src))
    293292  {
    294293    return nrzMapQ;
     
    302301 */
    303302
    304 void nrzSetExp(int m, ring r)
    305 {
    306 }
    307 
    308 void nrzInitExp(int m, ring r)
     303void nrzSetExp(int m, coeffs r)
     304{
     305}
     306
     307void nrzInitExp(int m, coeffs r)
    309308{
    310309}
     
    317316#endif
    318317
    319 void nrzWrite (number &a, const ring r)
     318void nrzWrite (number &a, const coeffs r)
    320319{
    321320  char *s,*z;
Note: See TracChangeset for help on using the changeset viewer.