Loading...
Searching...
No Matches
flintcf_Q.h File Reference
`#include "misc/auxiliary.h"`

Go to the source code of this file.

## Functions

BOOLEAN | flintQ_InitChar (coeffs cf, void *infoStruct)
coeffs | flintQInitCfByName (char *s, n_coeffType n)

## Function Documentation

## flintQ_InitChar()

BOOLEAN flintQ_InitChar | ( | coeffs | cf,
|  | void * | infoStruct )

Definition at line 636 of file flintcf_Q.cc.

{
char *pp=(char*)infoStruct;
cf->cfCoeffName = CoeffName;
cf->nCoeffIsEqual = CoeffIsEqual;
cf->cfKillChar = KillChar;
cf->cfSetChar = SetChar;
cf->ch=0; //char 0
cf->cfMult = Mult;
cf->cfSub = Sub;
cf->cfAdd = Add;
cf->cfDiv = Div;
cf->cfExactDiv = ExactDiv; // ???
cf->cfInit =Init;
cf->cfInitMPZ =InitMPZ;
cf->cfSize = Size;
cf->cfInt = Int;
cf->cfMPZ = MPZ;
cf->cfInpNeg = Neg;
cf->cfInvers = Invers;
cf->cfCopy = Copy;
cf->cfRePart = Copy;
// default: cf->cfImPart = ndReturn0;
cf->cfWriteLong = WriteShort; //WriteLong;
cf->cfWriteShort = WriteShort;
cf->cfRead = Read;
cf->cfNormalize = Normalize;
//cf->cfDivComp=
//cf->cfIsUnit=
//cf->cfGetUnit=
//cf->cfDivBy=
cf->cfGreater=Greater;
cf->cfEqual =Equal;
cf->cfIsZero =IsZero;
cf->cfIsOne =IsOne;
cf->cfIsMOne =IsMOne;
cf->cfGreaterZero=GreaterZero;
cf->cfPower = Power;
cf->cfGetDenom = GetDenom;
cf->cfGetNumerator = GetNumerator;
cf->cfGcd = Gcd;
cf->cfExtGcd = ExtGcd;
cf->cfLcm = Lcm;
cf->cfDelete = Delete;
cf->cfSetMap = SetMap;
// default: cf->cfInpMult
// default: cf->cfInpAdd
cf->cfFarey =Farey;
cf->cfChineseRemainder=ChineseRemainder;
cf->cfParDeg = ParDeg;
cf->cfParameter = Parameter;
// cf->cfClearContent = ClearContent;
// cf->cfClearDenominators = ClearDenominators;
cf->convFactoryNSingN=ConvFactoryNSingN;
cf->convSingNFactoryN=ConvSingNFactoryN;
cf->cfWriteFd = WriteFd;
cf->cfReadFd = ReadFd;
#ifdef LDEBUG
cf->cfDBTest = DBTest;
#endif
cf->iNumberOfParameters = 1;
char **pn=(char**)omAlloc0(sizeof(char*));
pn[0]=omStrDup(pp);
cf->pParameterNames = (const char **)pn;
cf->has_simple_Inverse= FALSE;
cf->has_simple_Alloc= FALSE;
cf->is_field=FALSE;
return FALSE;
}
FALSE
#define FALSE
Definition auxiliary.h:97
pp
CanonicalForm FACTORY_PUBLIC pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f ).
Definition cf_gcd.cc:676
cf
CanonicalForm cf
Definition cfModGcd.cc:4091
ExtGcd
static number ExtGcd(number a, number b, number *s, number *t, const coeffs)
Definition flintcf_Q.cc:447
WriteShort
static void WriteShort(number a, const coeffs r)
Definition flintcf_Q.cc:233
Copy
static number Copy(number a, const coeffs)
Definition flintcf_Q.cc:215
ChineseRemainder
static number ChineseRemainder(number *, number *, int, BOOLEAN, CFArray &, const coeffs)
Definition flintcf_Q.cc:500
Normalize
static void Normalize(number &a, const coeffs)
Definition flintcf_Q.cc:373
SetChar
static void SetChar(const coeffs)
Definition flintcf_Q.cc:53
SetMap
static nMapFunc SetMap(const coeffs, const coeffs)
Definition flintcf_Q.cc:470
Farey
static number Farey(number, number, const coeffs)
Definition flintcf_Q.cc:495
GetDenom
static number GetDenom(number &n, const coeffs)
Definition flintcf_Q.cc:423
Read
static const char * Read(const char *st, number *a, const coeffs r)
Definition flintcf_Q.cc:326
IsOne
static BOOLEAN IsOne(number a, const coeffs)
Definition flintcf_Q.cc:389
CoeffName
char * CoeffName(const coeffs r)
Definition flintcf_Q.cc:601
ConvFactoryNSingN
static number ConvFactoryNSingN(const CanonicalForm, const coeffs)
Definition flintcf_Q.cc:591
InitMPZ
static number InitMPZ(mpz_t i, const coeffs)
Definition flintcf_Q.cc:128
Size
static int Size(number n, const coeffs)
Definition flintcf_Q.cc:139
Add
static number Add(number a, number b, const coeffs)
Definition flintcf_Q.cc:71
Div
static number Div(number a, number b, const coeffs)
Definition flintcf_Q.cc:78
WriteFd
static void WriteFd(number a, const ssiInfo *d, const coeffs)
Definition flintcf_Q.cc:516
Delete
static void Delete(number *a, const coeffs)
Definition flintcf_Q.cc:461
Parameter
static number Parameter(const int, const coeffs)
Definition flintcf_Q.cc:509
DBTest
static BOOLEAN DBTest(number, const char *, const int, const coeffs)
Definition flintcf_Q.cc:626
KillChar
static void KillChar(coeffs cf)
Definition flintcf_Q.cc:631
ConvSingNFactoryN
static CanonicalForm ConvSingNFactoryN(number, BOOLEAN, const coeffs)
Definition flintcf_Q.cc:596
Init
static number Init(long i, const coeffs)
Definition flintcf_Q.cc:121
MPZ
static void MPZ(mpz_t result, number &n, const coeffs)
Definition flintcf_Q.cc:159
ReadFd
static number ReadFd(const ssiInfo *d, const coeffs)
Definition flintcf_Q.cc:561
ExactDiv
static number ExactDiv(number a, number b, const coeffs)
Definition flintcf_Q.cc:100
Power
static void Power(number a, int i, number *result, const coeffs)
Definition flintcf_Q.cc:416
IsMOne
static BOOLEAN IsMOne(number k, const coeffs)
Definition flintcf_Q.cc:393
Sub
static number Sub(number a, number b, const coeffs)
Definition flintcf_Q.cc:64
GetNumerator
static number GetNumerator(number &n, const coeffs)
Definition flintcf_Q.cc:431
GreaterZero
static BOOLEAN GreaterZero(number, const coeffs)
Definition flintcf_Q.cc:410
Gcd
static number Gcd(number a, number b, const coeffs)
Definition flintcf_Q.cc:440
CoeffIsEqual
static BOOLEAN CoeffIsEqual(const coeffs r, n_coeffType n, void *)
Definition flintcf_Q.cc:49
Mult
static number Mult(number a, number b, const coeffs)
Definition flintcf_Q.cc:57
Invers
static number Invers(number a, const coeffs)
Definition flintcf_Q.cc:195
Lcm
static number Lcm(number, number, const coeffs)
Definition flintcf_Q.cc:456
ParDeg
static int ParDeg(number x, const coeffs)
Definition flintcf_Q.cc:505
IsZero
static BOOLEAN IsZero(number a, const coeffs)
Definition flintcf_Q.cc:385
Neg
static number Neg(number a, const coeffs)
Definition flintcf_Q.cc:190
Equal
static BOOLEAN Equal(number a, number b, const coeffs)
Definition flintcf_Q.cc:381
Int
static long Int(number &n, const coeffs)
Definition flintcf_Q.cc:143
Greater
static bool Greater(mono_type m1, mono_type m2)
Definition interpolation.cc:285
omStrDup
#define omStrDup(s)
Definition omAllocDecl.h:263
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211

## flintQInitCfByName()

coeffs flintQInitCfByName | ( | char * | s,
|  | n_coeffType | n )

Definition at line 608 of file flintcf_Q.cc.

{
const char start[]="flintQp[";
const int start_len=strlen(start);
if (strncmp(s,start,start_len)==0)
{
s+=start_len;
char st[10];
int l=sscanf(s,"%s",st);
if (l==1)
{
while (st[strlen(st)-1]==']') st[strlen(st)-1]='\0';
return nInitChar(n,(void*)st);
}
}
return NULL;
}
l
int l
Definition cfEzgcd.cc:100
nInitChar
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
Definition numbers.cc:412
s
const CanonicalForm int s
Definition facAbsFact.cc:51
NULL
#define NULL
Definition omList.c:12