Loading...
Searching...
No Matches
ntupel.cc File Reference
`#include "misc/auxiliary.h"`
`#include "misc/mylimits.h"`
`#include "reporter/reporter.h"`
`#include "coeffs/numbers.h"`
`#include "coeffs/coeffs.h"`
`#include "coeffs/mpr_complex.h"`
`#include "coeffs/ntupel.h"`
`#include "coeffs/modulop.h"`
`#include "coeffs/longrat.h"`

Go to the source code of this file.

## Macros

#define | SI_BUF_SIZE 1024

## Typedefs

typedef coeffs * | coeffs_array
typedef number * | number_array
typedef char | si_char_SI_BUF_SIZE[SI_BUF_SIZE]

## Functions

static void | nnCoeffWrite (const coeffs r, BOOLEAN b)
static BOOLEAN | nnGreaterZero (number k, const coeffs r)
static number | nnMult (number a, number b, const coeffs r)
static void | nnInpMult (number &a, number b, const coeffs r)
static number | nnInit (long l, const coeffs r)
static long | nnInt (number &n, const coeffs r)
static int | nnSize (number n, const coeffs r)
static number | nnCopy (number a, const coeffs r)
static number | nnAdd (number a, number b, const coeffs r)
static void | nnInpAdd (number &a, number b, const coeffs r)
static number | nnSub (number a, number b, const coeffs r)
static BOOLEAN | nnIsZero (number a, const coeffs r)
static BOOLEAN | nnIsOne (number a, const coeffs r)
static BOOLEAN | nnIsMOne (number a, const coeffs r)
static number | nnDiv (number a, number b, const coeffs r)
static number | nnInvers (number a, const coeffs r)
static number | nnInpNeg (number a, const coeffs r)
static BOOLEAN | nnGreater (number a, number b, const coeffs r)
static BOOLEAN | nnEqual (number a, number b, const coeffs r)
static void | nnWriteShort (number a, const coeffs r)
static void | nnWriteLong (number a, const coeffs r)
static const char * | nnRead (const char *s, number *a, const coeffs r)
static BOOLEAN | nnDBTest (number a, const char *f, const int l, const coeffs r)
static number | nnMap (number from, const coeffs aRing, const coeffs r)
static nMapFunc | nnSetMap (const coeffs, const coeffs)
static char * | nnCoeffString (const coeffs r)
static char * | nnCoeffName (const coeffs r)
static void | nnDelete (number *a, const coeffs r)
static number | nnChineseRemainder (number *, number *, int, BOOLEAN, CFArray &, const coeffs)
BOOLEAN | nnInitChar (coeffs n, void *p)
| Initialize r.

## Variables

STATIC_VAR si_char_SI_BUF_SIZE | nnCoeffName_buf

## Macro Definition Documentation

## SI_BUF_SIZE

#define SI_BUF_SIZE 1024

## Typedef Documentation

## coeffs_array

typedef coeffs* coeffs_array

Definition at line 24 of file ntupel.cc.

## number_array

typedef number* number_array

Definition at line 25 of file ntupel.cc.

## si_char_SI_BUF_SIZE

typedef char si_char_SI_BUF_SIZE[SI_BUF_SIZE]

Definition at line 572 of file ntupel.cc.

## Function Documentation

## nnAdd()

number nnAdd | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 165 of file ntupel.cc.

{
number_array A=(number_array)a;
number_array B=(number_array)b;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
number *C=(number*)omAlloc(i*sizeof(number));
i=0;
loop
{
C[i]=d[i]->cfAdd(A[i],B[i],d[i]);
i++;
if (d[i]==NULL) return (number)C;
}
}
i
int i
Definition cfEzgcd.cc:132
b
CanonicalForm b
Definition cfModGcd.cc:4111
B
b *CanonicalForm B
Definition facBivar.cc:52
coeffs_array
coeffs * coeffs_array
Definition ntupel.cc:24
number_array
number * number_array
Definition ntupel.cc:25
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
NULL
#define NULL
Definition omList.c:12
A
#define A
Definition sirandom.c:24
loop
#define loop
Definition structs.h:71

## nnChineseRemainder()

number nnChineseRemainder | ( | number * | ,
|  | number * | ,
|  | int | ,
|  | BOOLEAN | ,
|  | CFArray & | ,
|  | const coeffs | )

static

Definition at line 609 of file ntupel.cc.

{
WerrorS("not yet");
return NULL;
}
WerrorS
void WerrorS(const char *s)
Definition feFopen.cc:24

## nnCoeffName()

char * nnCoeffName | ( | const coeffs | r | ) |

static

Definition at line 574 of file ntupel.cc.

{
coeffs_array d=(coeffs_array)r->data;
int i=0;
nnCoeffName_buf[0]='\0';
loop
{
char *s=d[i]->cfCoeffName(d[i]);
strncat(nnCoeffName_buf,s, SI_BUF_SIZE-strlen(nnCoeffName_buf)-strlen(s)-1);
i++;
if (d[i]==NULL) break;
strncat(nnCoeffName_buf," x ", SI_BUF_SIZE-strlen(nnCoeffName_buf)-4);
}
return nnCoeffName_buf;
}
s
const CanonicalForm int s
Definition facAbsFact.cc:51
nnCoeffName_buf
STATIC_VAR si_char_SI_BUF_SIZE nnCoeffName_buf
Definition ntupel.cc:573
SI_BUF_SIZE
#define SI_BUF_SIZE

## nnCoeffString()

char * nnCoeffString | ( | const coeffs | r | ) |

static

Definition at line 554 of file ntupel.cc.

{
#define SI_BUF_SIZE 1024
char buf[SI_BUF_SIZE];
coeffs_array d=(coeffs_array)r->data;
int i=0;
buf[0]='\0';
loop
{
char *s=d[i]->cfCoeffName(d[i]);
strncat(buf,s, SI_BUF_SIZE-strlen(buf)-strlen(s)-1);
i++;
if (d[i]==NULL) break;
strncat(buf," x ", SI_BUF_SIZE-strlen(buf)-4);
}
return omStrDup(buf);
}
omStrDup
#define omStrDup(s)
Definition omAllocDecl.h:263
buf
int status int void * buf
Definition si_signals.h:69

## nnCoeffWrite()

void nnCoeffWrite | ( | const coeffs | r,
|  | BOOLEAN | b )

static

Definition at line 27 of file ntupel.cc.

{
int i=0;
coeffs_array d=(coeffs_array)r->data;
loop
{
d[i]->cfCoeffWrite(d[i],b);
i++;
if (d[i]==NULL) break;
PrintS(" x ");
}
}
PrintS
void PrintS(const char *s)
Definition reporter.cc:288

## nnCopy()

number nnCopy | ( | number | a,
|  | const coeffs | r )

static

Definition at line 145 of file ntupel.cc.

{
number_array A=(number_array)a;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
number *C=(number*)omAlloc(i*sizeof(number));
i=0;
loop
{
C[i]=d[i]->cfCopy(A[i],d[i]);
i++;
if (d[i]==NULL) return (number)C;
}
}

## nnDBTest()

BOOLEAN nnDBTest | ( | number | a,
|  | const char * | f,
|  | const int | l,
|  | const coeffs | r )

static

Definition at line 512 of file ntupel.cc.

{
BOOLEAN bo=FALSE;
number_array A=(number_array)a;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
bo&=d[i]->cfDBTest(A[i],f,l,d[i]);
i++;
if (d[i]==NULL) return bo;
}
}
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
FALSE
#define FALSE
Definition auxiliary.h:97
l
int l
Definition cfEzgcd.cc:100
f
FILE * f
Definition checklibs.c:9

## nnDelete()

void nnDelete | ( | number * | a,
|  | const coeffs | r )

static

Definition at line 590 of file ntupel.cc.

{
if (*a!=NULL)
{
coeffs_array d=(coeffs_array)r->data;
number_array A=(number_array)(*a);
int i=0;
loop
{
d[i]->cfDelete(&(A[i]),d[i]);
i++;
if (d[i]==NULL) break;
}
omFreeSize(d,i*sizeof(number));
*a=NULL;
}
}
omFreeSize
#define omFreeSize(addr, size)
Definition omAllocDecl.h:260

## nnDiv()

number nnDiv | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 260 of file ntupel.cc.

{
if (nnIsZero(b,r))
{
WerrorS(nDivBy0);
return nnInit(0,r);
}
number_array A=(number_array)a;
number_array B=(number_array)b;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
number *C=(number*)omAlloc(i*sizeof(number));
i=0;
loop
{
C[i]=d[i]->cfDiv(A[i],B[i],d[i]);
i++;
if (d[i]==NULL) return (number)C;
}
}
nnIsZero
static BOOLEAN nnIsZero(number a, const coeffs r)
Definition ntupel.cc:221
nnInit
static number nnInit(long l, const coeffs r)
Definition ntupel.cc:92
nDivBy0
const char *const nDivBy0
Definition numbers.h:90

## nnEqual()

BOOLEAN nnEqual | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 348 of file ntupel.cc.

{
int i=0;
number_array A=(number_array)a;
number_array B=(number_array)b;
coeffs_array d=(coeffs_array)r->data;
loop
{
if (!d[i]->cfEqual(A[i],B[i],d[i])) return FALSE;
i++;
if (d[i]==NULL) return TRUE;
}
}
TRUE
#define TRUE
Definition auxiliary.h:101

## nnGreater()

BOOLEAN nnGreater | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 330 of file ntupel.cc.

{
number_array A=(number_array)a;
number_array B=(number_array)b;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
if (d[i]->type==n_R) return d[i]->cfGreater(A[i],B[i],d[i]);
else if (d[i]->type==n_long_R) return d[i]->cfGreater(A[i],B[i],d[i]);
i++;
if (d[i]==NULL)
{
return d[i-1]->cfGreater(A[i],B[i],d[i-1]);
}
}
}
n_R
@ n_R
single prescision (6,6) real numbers
Definition coeffs.h:31
n_long_R
@ n_long_R
real floating point (GMP) numbers
Definition coeffs.h:33

## nnGreaterZero()

BOOLEAN nnGreaterZero | ( | number | k,
|  | const coeffs | r )

static

Definition at line 41 of file ntupel.cc.

{
int i=0;
coeffs_array d=(coeffs_array)r->data;
loop
{
if (d[i]->type==n_R) return d[i]->cfGreaterZero(k,d[i]);
if (d[i]->type==n_long_R) return d[i]->cfGreaterZero(k,d[i]);
i++;
if (d[i]==NULL) return d[i-1]->cfGreaterZero(k,d[i-1]);
}
}
k
int k
Definition cfEzgcd.cc:99

## nnInit()

number nnInit | ( | long | l,
|  | const coeffs | r )

static

Definition at line 92 of file ntupel.cc.

{
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
number *C=(number*)omAlloc(i*sizeof(number));
i=0;
loop
{
C[i]=d[i]->cfInit(l,d[i]);
i++;
if (d[i]==NULL) return (number)C;
}
}

## nnInitChar()

BOOLEAN nnInitChar | ( | coeffs | n,
|  | void * | p )

Initialize r.

Definition at line 616 of file ntupel.cc.

{
n->data=p;
n->type=n_nTupel;
n->is_field=TRUE;
n->is_domain=TRUE;
n->ch = 0;
n->cfCoeffString = nnCoeffString;
n->cfCoeffName = nnCoeffName;
n->cfInit = nnInit;
n->cfDelete = nnDelete;
n->cfInt = nnInt;
n->cfAdd = nnAdd;
n->cfInpAdd = nnInpAdd;
n->cfSub = nnSub;
n->cfMult = nnMult;
n->cfInpMult = nnInpMult;
n->cfDiv = nnDiv;
n->cfExactDiv= nnDiv;
n->cfInpNeg = nnInpNeg;
n->cfInvers= nnInvers;
n->cfCopy = nnCopy;
n->cfGreater = nnGreater;
n->cfEqual = nnEqual;
n->cfIsZero = nnIsZero;
n->cfIsOne = nnIsOne;
n->cfIsMOne = nnIsMOne;
n->cfGreaterZero = nnGreaterZero;
n->cfWriteShort = nnWriteShort;
n->cfWriteLong = nnWriteLong;
n->cfRead = nnRead;
//n->cfPower = nnPower;
n->cfSetMap = nnSetMap;
n->cfCoeffWrite = nnCoeffWrite;
n->cfChineseRemainder=nnChineseRemainder;
n->cfSize = nnSize;
#ifdef LDEBUG
n->cfDBTest=nnDBTest;
#endif
//n->nCoeffIsEqual = ndCoeffIsEqual;
return FALSE;
}
p
int p
Definition cfModGcd.cc:4086
n_nTupel
@ n_nTupel
n-tupel of cf: ZZ/p1,... ZZ/pn, R, long_R
Definition coeffs.h:42
nnCoeffName
static char * nnCoeffName(const coeffs r)
Definition ntupel.cc:574
nnDBTest
static BOOLEAN nnDBTest(number a, const char *f, const int l, const coeffs r)
Definition ntupel.cc:512
nnIsMOne
static BOOLEAN nnIsMOne(number a, const coeffs r)
Definition ntupel.cc:247
nnCopy
static number nnCopy(number a, const coeffs r)
Definition ntupel.cc:145
nnDiv
static number nnDiv(number a, number b, const coeffs r)
Definition ntupel.cc:260
nnAdd
static number nnAdd(number a, number b, const coeffs r)
Definition ntupel.cc:165
nnDelete
static void nnDelete(number *a, const coeffs r)
Definition ntupel.cc:590
nnInpNeg
static number nnInpNeg(number a, const coeffs r)
Definition ntupel.cc:311
nnWriteShort
static void nnWriteShort(number a, const coeffs r)
Definition ntupel.cc:362
nnEqual
static BOOLEAN nnEqual(number a, number b, const coeffs r)
Definition ntupel.cc:348
nnInt
static long nnInt(number &n, const coeffs r)
Definition ntupel.cc:114
nnMult
static number nnMult(number a, number b, const coeffs r)
Definition ntupel.cc:54
nnGreaterZero
static BOOLEAN nnGreaterZero(number k, const coeffs r)
Definition ntupel.cc:41
nnRead
static const char * nnRead(const char *s, number *a, const coeffs r)
Definition ntupel.cc:411
nnGreater
static BOOLEAN nnGreater(number a, number b, const coeffs r)
Definition ntupel.cc:330
nnSetMap
static nMapFunc nnSetMap(const coeffs, const coeffs)
Definition ntupel.cc:549
nnInvers
static number nnInvers(number a, const coeffs r)
Definition ntupel.cc:286
nnSub
static number nnSub(number a, number b, const coeffs r)
Definition ntupel.cc:200
nnCoeffWrite
static void nnCoeffWrite(const coeffs r, BOOLEAN b)
Definition ntupel.cc:27
nnIsOne
static BOOLEAN nnIsOne(number a, const coeffs r)
Definition ntupel.cc:234
nnSize
static int nnSize(number n, const coeffs r)
Definition ntupel.cc:127
nnChineseRemainder
static number nnChineseRemainder(number *, number *, int, BOOLEAN, CFArray &, const coeffs)
Definition ntupel.cc:609
nnInpAdd
static void nnInpAdd(number &a, number b, const coeffs r)
Definition ntupel.cc:186
nnWriteLong
static void nnWriteLong(number a, const coeffs r)
Definition ntupel.cc:376
nnInpMult
static void nnInpMult(number &a, number b, const coeffs r)
Definition ntupel.cc:75
nnCoeffString
static char * nnCoeffString(const coeffs r)
Definition ntupel.cc:554

## nnInpAdd()

void nnInpAdd | ( | number & | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 186 of file ntupel.cc.

{
number_array A=(number_array)a;
number_array B=(number_array)b;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
d[i]->cfInpAdd(A[i],B[i],d[i]);
i++;
if (d[i]==NULL) return;
}
}

## nnInpMult()

void nnInpMult | ( | number & | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 75 of file ntupel.cc.

{
number_array A=(number_array)a;
number_array B=(number_array)b;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
d[i]->cfInpMult(A[i],B[i],d[i]);
i++;
if (d[i]==NULL) return;
}
}

## nnInpNeg()

number nnInpNeg | ( | number | a,
|  | const coeffs | r )

static

Definition at line 311 of file ntupel.cc.

{
number_array A=(number_array)a;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
i=0;
loop
{
A[i]=d[i]->cfInpNeg(A[i],d[i]);
i++;
if (d[i]==NULL) return (number)A;
}
}

## nnInt()

long nnInt | ( | number & | n,
|  | const coeffs | r )

static

Definition at line 114 of file ntupel.cc.

{
int i=0;
coeffs_array d=(coeffs_array)r->data;
loop
{
if (d[i]->type==n_R) return d[i]->cfInt(n,d[i]);
if (d[i]->type==n_long_R) return d[i]->cfInt(n,d[i]);
i++;
if (d[i]==NULL) return d[i-1]->cfInt(n,d[i-1]);
}
}

## nnInvers()

number nnInvers | ( | number | a,
|  | const coeffs | r )

static

Definition at line 286 of file ntupel.cc.

{
if (nnIsZero(a,r))
{
WerrorS(nDivBy0);
return nnInit(0,r);
}
number_array A=(number_array)a;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
number *C=(number*)omAlloc(i*sizeof(number));
i=0;
loop
{
C[i]=d[i]->cfInvers(A[i],d[i]);
i++;
if (d[i]==NULL) return (number)C;
}
}

## nnIsMOne()

BOOLEAN nnIsMOne | ( | number | a,
|  | const coeffs | r )

static

Definition at line 247 of file ntupel.cc.

{
int i=0;
number_array A=(number_array)a;
coeffs_array d=(coeffs_array)r->data;
loop
{
if (!d[i]->cfIsMOne(A[i],d[i])) return FALSE;
i++;
if (d[i]==NULL) return TRUE;
}
}

## nnIsOne()

BOOLEAN nnIsOne | ( | number | a,
|  | const coeffs | r )

static

Definition at line 234 of file ntupel.cc.

{
int i=0;
number_array A=(number_array)a;
coeffs_array d=(coeffs_array)r->data;
loop
{
if (!d[i]->cfIsOne(A[i],d[i])) return FALSE;
i++;
if (d[i]==NULL) return TRUE;
}
}

## nnIsZero()

BOOLEAN nnIsZero | ( | number | a,
|  | const coeffs | r )

static

Definition at line 221 of file ntupel.cc.

{
number_array A=(number_array)a;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
if (!d[i]->cfIsZero(A[i],d[i])) return FALSE;
i++;
if (d[i]==NULL) return TRUE;
}
}

## nnMap()

number nnMap | ( | number | from,
|  | const coeffs | aRing,
|  | const coeffs | r )

static

Definition at line 527 of file ntupel.cc.

{
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
number *C=(number*)omAlloc(i*sizeof(number));
nMapFunc nMap;
i=0;
loop
{
nMap=d[i]->cfSetMap(aRing,d[i]);
if (nMap==NULL) Werror("no map for component %d",i);
else C[i]=nMap(from,aRing,d[i]);
i++;
if (d[i]==NULL) return (number)C;
}
}
nMapFunc
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition coeffs.h:80
Werror
void Werror(const char *fmt,...)
Definition reporter.cc:189

## nnMult()

number nnMult | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 54 of file ntupel.cc.

{
number_array A=(number_array)a;
number_array B=(number_array)b;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
number *C=(number*)omAlloc(i*sizeof(number));
i=0;
loop
{
C[i]=d[i]->cfMult(A[i],B[i],d[i]);
i++;
if (d[i]==NULL) return (number)C;
}
}

## nnRead()

const char * nnRead | ( | const char * | s,
|  | number * | a,
|  | const coeffs | r )

static

Definition at line 411 of file ntupel.cc.

{
// reading R/longR part, setting everything else to random
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
number *C=(number*)omAlloc0(i*sizeof(number));
*a=(number)C;
int is_zero=2; /*1: read 0, 2: read <> 0 */
int reader=-1;
i=0;
loop
{
if ((d[i]->type==n_R)
|| (d[i]->type==n_long_R))
{
s=d[i]->cfRead(s,&(C[i]),d[i]);
is_zero=d[i]->cfIsZero(C[i],d[i]);
reader=i;
break;
}
i++;
if (d[i]==NULL)
{
s=d[i-1]->cfRead(s,&(C[i-1]),d[i-1]);
is_zero=d[i-1]->cfIsZero(C[i-1],d[i-1]);
reader=i-1;
break;
}
}
if (is_zero==0)
{ // setting random values!=0 for Z/p
i=0;
loop
{
if (i!=reader)
{
if (d[i]->type==n_Zp)
{
int l=0;
do
{
l=siRand();
} while(l%(d[i]->ch)==0);
C[i]=d[i]->cfInit(l,d[i]);
}
else if ((d[i]->type==n_R)
|| (d[i]->type==n_long_R))
{
nMapFunc nMap=d[i]->cfSetMap(d[reader],d[i]);
C[i]=nMap(C[reader],d[reader],d[i]);
}
else
{
WerrorS("reading is not suppiorted for such compinations of coeffs");
break;
}
}
i++;
if (d[i]==NULL) break;
}
}
else if (is_zero==1)
{ // read a zero
i=0;
loop
{
C[i]=d[i]->cfInit(0,d[i]);
i++;
if (d[i]==NULL) break;
}
}
else if (reader==-1)/* not R or long_R*/
{
s=d[0]->cfRead(s,&(C[0]),d[0]);
i=1;
loop
{
if (d[i]==NULL) break;
i++;
{
nMapFunc nMap=d[i]->cfSetMap(d[0],d[i]);
C[i]=nMap(C[0],d[0],d[i]);
}
}
}
else
{
WerrorS("nnRead: should not happen");
}
return s;
}
n_Zp
@ n_Zp
\F{p < 2^31}
Definition coeffs.h:29
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211
siRand
int siRand()
Definition sirandom.c:42

## nnSetMap()

nMapFunc nnSetMap | ( | const coeffs | ,
|  | const coeffs | )

static

Definition at line 549 of file ntupel.cc.

{
return nnMap;
}
nnMap
static number nnMap(number from, const coeffs aRing, const coeffs r)
Definition ntupel.cc:527

## nnSize()

int nnSize | ( | number | n,
|  | const coeffs | r )

static

Definition at line 127 of file ntupel.cc.

{
int s=0;
int i=0;
coeffs_array d=(coeffs_array)r->data;
loop
{
if (d[i]->type==n_R) s+=d[i]->cfSize(n,d[i]);
else if (d[i]->type==n_long_R) s+=d[i]->cfSize(n,d[i]);
i++;
if (d[i]==NULL)
{
if (s==0) return d[i-1]->cfSize(n,d[i-1]);
else return s;
}
}
}

## nnSub()

number nnSub | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 200 of file ntupel.cc.

{
number_array A=(number_array)a;
number_array B=(number_array)b;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
i++;
if (d[i]==NULL) break;
}
number *C=(number*)omAlloc(i*sizeof(number));
i=0;
loop
{
C[i]=d[i]->cfSub(A[i],B[i],d[i]);
i++;
if (d[i]==NULL) return (number)C;
}
}

## nnWriteLong()

void nnWriteLong | ( | number | a,
|  | const coeffs | r )

static

Definition at line 376 of file ntupel.cc.

{
number_array A=(number_array)a;
coeffs_array d=(coeffs_array)r->data;
int i=0;
StringSetS("(");
loop
{
d[i]->cfWriteLong(A[i],d[i]);
i++;
if (d[i]==NULL) {StringAppendS(")"); return; }
else StringAppendS(",");
}
}
StringSetS
void StringSetS(const char *st)
Definition reporter.cc:128
StringAppendS
void StringAppendS(const char *st)
Definition reporter.cc:107

## nnWriteShort()

void nnWriteShort | ( | number | a,
|  | const coeffs | r )

static

Definition at line 362 of file ntupel.cc.

{
number_array A=(number_array)a;
coeffs_array d=(coeffs_array)r->data;
int i=0;
loop
{
if (d[i]->type==n_R) { d[i]->cfWriteLong(A[i],d[i]); return; }
else if (d[i]->type==n_long_R) {d[i]->cfWriteLong(A[i],d[i]); return; }
i++;
if (d[i]==NULL) { d[i-1]->cfWriteLong(A[i-1],d[i-1]); return; }
}
}

## Variable Documentation

## nnCoeffName_buf

STATIC_VAR si_char_SI_BUF_SIZE nnCoeffName_buf

Definition at line 573 of file ntupel.cc.