My Project
Loading...
Searching...
No Matches
Functions
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 561 of file flintcf_Q.cc.

562{
563 char *pp=(char*)infoStruct;
564 cf->cfCoeffName = CoeffName;
565 cf->nCoeffIsEqual = CoeffIsEqual;
566 cf->cfKillChar = KillChar;
567 cf->cfSetChar = SetChar;
568 cf->ch=0; //char 0
569 cf->cfMult = Mult;
570 cf->cfSub = Sub;
571 cf->cfAdd = Add;
572 cf->cfDiv = Div;
573 cf->cfExactDiv = ExactDiv; // ???
574 cf->cfInit =Init;
575 cf->cfInitMPZ =InitMPZ;
576 cf->cfSize = Size;
577 cf->cfInt = Int;
578 cf->cfMPZ = MPZ;
579 cf->cfInpNeg = Neg;
580 cf->cfInvers = Invers;
581 cf->cfCopy = Copy;
582 cf->cfRePart = Copy;
583 // default: cf->cfImPart = ndReturn0;
584 cf->cfWriteLong = WriteShort; //WriteLong;
585 cf->cfWriteShort = WriteShort;
586 cf->cfRead = Read;
587 cf->cfNormalize = Normalize;
588
589 //cf->cfDivComp=
590 //cf->cfIsUnit=
591 //cf->cfGetUnit=
592 //cf->cfDivBy=
593
594 cf->cfGreater=Greater;
595 cf->cfEqual =Equal;
596 cf->cfIsZero =IsZero;
597 cf->cfIsOne =IsOne;
598 cf->cfIsMOne =IsMOne;
599 cf->cfGreaterZero=GreaterZero;
600
601 cf->cfPower = Power;
602 cf->cfGetDenom = GetDenom;
603 cf->cfGetNumerator = GetNumerator;
604 cf->cfGcd = Gcd;
605 cf->cfExtGcd = ExtGcd;
606 cf->cfLcm = Lcm;
607 cf->cfDelete = Delete;
608 cf->cfSetMap = SetMap;
609 // default: cf->cfInpMult
610 // default: cf->cfInpAdd
611 cf->cfFarey =Farey;
612 cf->cfChineseRemainder=ChineseRemainder;
613 cf->cfParDeg = ParDeg;
614 cf->cfParameter = Parameter;
615 // cf->cfClearContent = ClearContent;
616 // cf->cfClearDenominators = ClearDenominators;
617 cf->convFactoryNSingN=ConvFactoryNSingN;
618 cf->convSingNFactoryN=ConvSingNFactoryN;
619 cf->cfWriteFd = WriteFd;
620 cf->cfReadFd = ReadFd;
621#ifdef LDEBUG
622 cf->cfDBTest = DBTest;
623#endif
624
625 cf->iNumberOfParameters = 1;
626 char **pn=(char**)omAlloc0(sizeof(char*));
627 pn[0]=omStrDup(pp);
628 cf->pParameterNames = (const char **)pn;
629 cf->has_simple_Inverse= FALSE;
630 cf->has_simple_Alloc= FALSE;
631 cf->is_field=FALSE;
632
633 return FALSE;
634}
#define FALSE
Definition: auxiliary.h:96
CanonicalForm FACTORY_PUBLIC pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f )
Definition: cf_gcd.cc:676
CanonicalForm cf
Definition: cfModGcd.cc:4083
static number ExtGcd(number a, number b, number *s, number *t, const coeffs)
Definition: flintcf_Q.cc:397
static void WriteShort(number a, const coeffs r)
Definition: flintcf_Q.cc:220
static number Copy(number a, const coeffs)
Definition: flintcf_Q.cc:202
static number ChineseRemainder(number *, number *, int, BOOLEAN, CFArray &, const coeffs)
Definition: flintcf_Q.cc:450
static void Normalize(number &a, const coeffs)
Definition: flintcf_Q.cc:316
static void SetChar(const coeffs)
Definition: flintcf_Q.cc:50
static nMapFunc SetMap(const coeffs, const coeffs)
Definition: flintcf_Q.cc:420
static number Farey(number, number, const coeffs)
Definition: flintcf_Q.cc:445
static number GetDenom(number &n, const coeffs)
Definition: flintcf_Q.cc:373
static const char * Read(const char *st, number *a, const coeffs r)
Definition: flintcf_Q.cc:274
static BOOLEAN IsOne(number a, const coeffs)
Definition: flintcf_Q.cc:332
char * CoeffName(const coeffs r)
Definition: flintcf_Q.cc:526
static number ConvFactoryNSingN(const CanonicalForm, const coeffs)
Definition: flintcf_Q.cc:516
static number InitMPZ(mpz_t i, const coeffs)
Definition: flintcf_Q.cc:125
static int Size(number n, const coeffs)
Definition: flintcf_Q.cc:132
static number Add(number a, number b, const coeffs)
Definition: flintcf_Q.cc:68
static number Div(number a, number b, const coeffs)
Definition: flintcf_Q.cc:75
static void WriteFd(number a, const ssiInfo *d, const coeffs)
Definition: flintcf_Q.cc:466
static void Delete(number *a, const coeffs)
Definition: flintcf_Q.cc:411
static number Parameter(const int, const coeffs)
Definition: flintcf_Q.cc:459
static BOOLEAN DBTest(number, const char *, const int, const coeffs)
Definition: flintcf_Q.cc:551
static void KillChar(coeffs cf)
Definition: flintcf_Q.cc:556
static CanonicalForm ConvSingNFactoryN(number, BOOLEAN, const coeffs)
Definition: flintcf_Q.cc:521
static number Init(long i, const coeffs)
Definition: flintcf_Q.cc:118
static void MPZ(mpz_t result, number &n, const coeffs)
Definition: flintcf_Q.cc:159
static number ReadFd(const ssiInfo *d, const coeffs)
Definition: flintcf_Q.cc:491
static number ExactDiv(number a, number b, const coeffs)
Definition: flintcf_Q.cc:97
static void Power(number a, int i, number *result, const coeffs)
Definition: flintcf_Q.cc:366
static BOOLEAN IsMOne(number k, const coeffs)
Definition: flintcf_Q.cc:336
static number Sub(number a, number b, const coeffs)
Definition: flintcf_Q.cc:61
static number GetNumerator(number &n, const coeffs)
Definition: flintcf_Q.cc:381
static BOOLEAN GreaterZero(number, const coeffs)
Definition: flintcf_Q.cc:360
static number Gcd(number a, number b, const coeffs)
Definition: flintcf_Q.cc:390
static BOOLEAN CoeffIsEqual(const coeffs r, n_coeffType n, void *)
Definition: flintcf_Q.cc:46
static number Mult(number a, number b, const coeffs)
Definition: flintcf_Q.cc:54
static number Invers(number a, const coeffs)
Definition: flintcf_Q.cc:182
static number Lcm(number, number, const coeffs)
Definition: flintcf_Q.cc:406
static int ParDeg(number x, const coeffs)
Definition: flintcf_Q.cc:455
static BOOLEAN IsZero(number a, const coeffs)
Definition: flintcf_Q.cc:328
static number Neg(number a, const coeffs)
Definition: flintcf_Q.cc:177
static BOOLEAN Equal(number a, number b, const coeffs)
Definition: flintcf_Q.cc:324
static BOOLEAN Greater(number a, number b, const coeffs)
Definition: flintcf_Q.cc:320
static long Int(number &n, const coeffs)
Definition: flintcf_Q.cc:136
#define omStrDup(s)
Definition: omAllocDecl.h:263
#define omAlloc0(size)
Definition: omAllocDecl.h:211

◆ flintQInitCfByName()

coeffs flintQInitCfByName ( char *  s,
n_coeffType  n 
)

Definition at line 533 of file flintcf_Q.cc.

534{
535 const char start[]="flintQp[";
536 const int start_len=strlen(start);
537 if (strncmp(s,start,start_len)==0)
538 {
539 s+=start_len;
540 char st[10];
541 int l=sscanf(s,"%s",st);
542 if (l==1)
543 {
544 while (st[strlen(st)-1]==']') st[strlen(st)-1]='\0';
545 return nInitChar(n,(void*)st);
546 }
547 }
548 return NULL;
549}
int l
Definition: cfEzgcd.cc:100
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
Definition: numbers.cc:413
const CanonicalForm int s
Definition: facAbsFact.cc:51
#define NULL
Definition: omList.c:12