source: git/libpolys/polys/ext_fields/algext.h @ 0fb5991

spielwiese
Last change on this file since 0fb5991 was 0fb5991, checked in by Frank Seelisch <seelisch@…>, 13 years ago
fixes so that libpoly builds without compiler errors in algext.cc (make check may be broken)
  • Property mode set to 100644
File size: 3.7 KB
Line 
1#ifndef ALGEXT_H
2#define ALGEXT_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7/*
8* ABSTRACT: numbers in an algebraic extension field K(a)
9*           Assuming that we have a coeffs object cf, then these numbers
10*           are polynomials in the polynomial ring K[a] represented by
11*           cf->algring.
12*           IMPORTANT ASSUMPTIONS:
13*           1.) So far we assume that cf->algring is a valid polynomial
14*               ring in exactly one variable, i.e., K[a], where K is allowed
15*               to be any field (representable in SINGULAR and which may
16*               itself be some extension field, thus allowing for extension
17*               towers).
18*           2.) Moreover, this implementation assumes that
19*               cf->algring->minideal is not NULL but an ideal with at
20*               least one non-zero generator which may be accessed by
21*               cf->algring->minideal->m[0] and which represents the minimal
22*               polynomial of the extension variable 'a' in K[a].
23*/
24#include <coeffs/coeffs.h>
25
26struct ip_sring;
27typedef struct ip_sring * ring;
28
29struct sip_sideal;
30typedef struct sip_sideal * ideal;
31
32/// struct for pass initialization parameters to naInitChar
33typedef struct 
34{
35  ring r;
36  ideal i;
37} ExtInfo;
38
39/// Get a mapping function from src into the domain of this type (n_Ext)
40nMapFunc naSetMap(const coeffs src, const coeffs dst);
41
42/// Initialize the coeffs object
43BOOLEAN  naInitChar(coeffs cf, void* infoStruct);
44
45/* Private hidden interface
46BOOLEAN  naGreaterZero(number a, const coeffs cf);
47BOOLEAN  naGreater(number a, number b, const coeffs cf);
48BOOLEAN  naEqual(number a, number b, const coeffs cf);
49BOOLEAN  naIsOne(number a, const coeffs cf);
50BOOLEAN  naIsMOne(number a, const coeffs cf);
51BOOLEAN  naIsZero(number a, const coeffs cf);
52number   naInit(int i, const coeffs cf);
53int      naInt(number &a, const coeffs cf);
54number   naNeg(number a, const coeffs cf);
55number   naInvers(number a, const coeffs cf);
56number   naPar(int i, const coeffs cf);
57number   naAdd(number a, number b, const coeffs cf);
58number   naSub(number a, number b, const coeffs cf);
59number   naMult(number a, number b, const coeffs cf);
60number   naDiv(number a, number b, const coeffs cf);
61void     naPower(number a, int exp, number *b, const coeffs cf);
62number   naCopy(number a, const coeffs cf);
63void     naWrite(number &a, const coeffs cf);
64number   naRePart(number a, const coeffs cf);
65number   naImPart(number a, const coeffs cf);
66number   naGetDenom(number &a, const coeffs cf);
67number   naGetNumerator(number &a, const coeffs cf);
68number   naGcd(number a, number b, const coeffs cf);
69number   naLcm(number a, number b, const coeffs cf);
70number   naSize(number a, const coeffs cf);
71void     naDelete(number *a, const coeffs cf);
72void     naCoeffWrite(const coeffs cf);
73number   naIntDiv(number a, number b, const coeffs cf);
74const char * naRead(const char *s, number *a, const coeffs cf);
75static BOOLEAN naCoeffIsEqual(const coeffs cf, n_coeffType n, void * param);
76*/
77
78#ifdef LDEBUG
79#define naTest(a) naDBTest(a,__FILE__,__LINE__,cf)
80BOOLEAN  naDBTest(number a, const char *f, const int l, const coeffs r);
81#else
82#define naTest(a)
83#endif
84
85/* our own type */
86#define naID n_Ext
87
88/* polynomial ring in which our numbers live */
89#define naRing cf->algring
90
91/* coeffs object in which the coefficients of our numbers live;
92 * methods attached to naCoeffs may be used to compute with the
93 * coefficients of our numbers, e.g., use naCoeffs->nAdd to add
94 * coefficients of our numbers */
95#define naCoeffs cf->algring->cf
96
97/* minimal polynomial */
98#define naMinpoly naRing->minideal->m[0]
99
100#endif
101/* ALGEXT_H */
Note: See TracBrowser for help on using the repository browser.