13#include <flint/flint.h>
14#include <flint/nmod_poly.h>
29static const char*
Eati(
const char *
s,
int *
i)
32 if (((*
s) >=
'0') && ((*
s) <=
'9'))
40 while (((*
s) >=
'0') && ((*
s) <=
'9'));
50 return (r->type==n) &&(r->ch==
pp->ch)
51 &&(r->pParameterNames!=
NULL)
52 &&(
strcmp(r->pParameterNames[0],
pp->name)==0);
253 if (*
s==
'-') { neg=
TRUE;
s++;}
260 else if(
strncmp(
s,r->pParameterNames[0],
strlen(r->pParameterNames[0]))==0)
263 s+=
strlen(r->pParameterNames[0]);
396 WerrorS(
"not yet: ChineseRemainder");
415 WerrorS(
"not yet: ConvFactoryNSingN");
422 WerrorS(
"not yet: ConvSingNFactoryN");
434 const char start[]=
"flint:Z/";
459 for(
int i=
l;
i>=0;
i--)
473 for (
int i=
l;
i>=0;
i--)
551 cf->iNumberOfParameters = 1;
554 cf->pParameterNames = (
const char **)
pn;
Coefficient rings, fields and other domains suitable for Singular polynomials.
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
const CanonicalForm int s
nmod_poly_init(FLINTmipo, getCharacteristic())
nmod_poly_clear(FLINTmipo)
‘factory.h’ is the user interface to Factory.
void WerrorS(const char *s)
static number ConvFactoryNSingN(const CanonicalForm, const coeffs)
static CanonicalForm ConvSingNFactoryN(number, BOOLEAN, const coeffs)
static void WriteShort(number a, const coeffs r)
static char * CoeffName(const coeffs r)
static number Lcm(number a, number b, const coeffs r)
static void MPZ(mpz_t result, number &n, const coeffs r)
static number Neg(number a, const coeffs r)
static BOOLEAN Greater(number a, number b, const coeffs r)
static const char * Read(const char *st, number *a, const coeffs r)
static number Mult(number a, number b, const coeffs c)
static number Init_bigint(number i, const coeffs dummy, const coeffs dst)
static number Sub(number a, number b, const coeffs c)
static long Int(number &n, const coeffs r)
static number Init(long i, const coeffs r)
static BOOLEAN CoeffIsEqual(const coeffs r, n_coeffType n, void *parameter)
static void Normalize(number &a, const coeffs r)
static number Gcd(number a, number b, const coeffs r)
static number ExtGcd(number a, number b, number *s, number *t, const coeffs r)
static void WriteFd(number a, const ssiInfo *d, const coeffs)
static BOOLEAN GreaterZero(number k, const coeffs r)
static BOOLEAN DBTest(number a, const char *f, const int l, const coeffs r)
static void Delete(number *a, const coeffs r)
static number ReadFd(const ssiInfo *d, const coeffs r)
BOOLEAN flintZn_InitChar(coeffs cf, void *infoStruct)
static void KillChar(coeffs cf)
nmod_poly_struct * nmod_poly_ptr
static number Copy(number a, const coeffs r)
static number InitMPZ(mpz_t i, const coeffs r)
static number Div(number a, number b, const coeffs c)
static void Power(number a, int i, number *result, const coeffs r)
static BOOLEAN Equal(number a, number b, const coeffs r)
static number Add(number a, number b, const coeffs c)
static BOOLEAN IsOne(number a, const coeffs r)
static number Farey(number p, number n, const coeffs)
static BOOLEAN IsZero(number a, const coeffs r)
static int ParDeg(number x, const coeffs r)
static nMapFunc SetMap(const coeffs src, const coeffs dst)
static number ChineseRemainder(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs)
static BOOLEAN IsMOne(number k, const coeffs r)
static void SetChar(const coeffs r)
static const char * Eati(const char *s, int *i)
static number Parameter(const int i, const coeffs r)
static number Invers(number a, const coeffs r)
static number IntMod(number a, number b, const coeffs c)
static int Size(number n, const coeffs r)
coeffs flintZnInitCfByName(char *s, n_coeffType n)
static number ExactDiv(number a, number b, const coeffs c)
number nvInvers(number c, const coeffs r)
The main handler for Singular numbers which are suitable for Singular polynomials.
const char *const nDivBy0
#define omFreeSize(addr, size)
void StringAppendS(const char *st)
long s_readlong(s_buff F)