My Project
Macros | Typedefs | Functions | Variables
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 coeffscoeffs_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 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 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)
 
BOOLEAN nnDBTest (number a, const char *f, const int l, const coeffs r)
 
static number nnMap (number from, const coeffs aRing, const coeffs r)
 
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. More...
 

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 544 of file ntupel.cc.

Function Documentation

◆ nnAdd()

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

Definition at line 151 of file ntupel.cc.

152{
155 coeffs_array d=(coeffs_array)r->data;
156 int i=0;
157 loop
158 {
159 i++;
160 if (d[i]==NULL) break;
161 }
162 number *C=(number*)omAlloc(i*sizeof(number));
163 i=0;
164 loop
165 {
166 C[i]=d[i]->cfAdd(A[i],B[i],d[i]);
167 i++;
168 if (d[i]==NULL) return (number)C;
169 }
170}
int i
Definition: cfEzgcd.cc:132
CanonicalForm b
Definition: cfModGcd.cc:4103
b *CanonicalForm B
Definition: facBivar.cc:52
if(yy_init)
Definition: libparse.cc:1420
The main handler for Singular numbers which are suitable for Singular polynomials.
coeffs * coeffs_array
Definition: ntupel.cc:24
number * number_array
Definition: ntupel.cc:25
#define omAlloc(size)
Definition: omAllocDecl.h:210
#define NULL
Definition: omList.c:12
#define A
Definition: sirandom.c:24
#define loop
Definition: structs.h:75

◆ nnChineseRemainder()

static number nnChineseRemainder ( number *  ,
number *  ,
int  ,
BOOLEAN  ,
CFArray ,
const  coeffs 
)
static

Definition at line 581 of file ntupel.cc.

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

◆ nnCoeffName()

static char * nnCoeffName ( const coeffs  r)
static

Definition at line 546 of file ntupel.cc.

547{
548 coeffs_array d=(coeffs_array)r->data;
549 int i=0;
550 nnCoeffName_buf[0]='\0';
551 loop
552 {
553 char *s=d[i]->cfCoeffName(d[i]);
554 strncat(nnCoeffName_buf,s, SI_BUF_SIZE-strlen(nnCoeffName_buf)-strlen(s)-1);
555 i++;
556 if (d[i]==NULL) break;
557 strncat(nnCoeffName_buf," x ", SI_BUF_SIZE-strlen(nnCoeffName_buf)-4);
558 }
559 return nnCoeffName_buf;
560}
const CanonicalForm int s
Definition: facAbsFact.cc:51
STATIC_VAR si_char_SI_BUF_SIZE nnCoeffName_buf
Definition: ntupel.cc:545
#define SI_BUF_SIZE

◆ nnCoeffString()

static char * nnCoeffString ( const coeffs  r)
static

Definition at line 526 of file ntupel.cc.

527{
528 #define SI_BUF_SIZE 1024
529 char buf[SI_BUF_SIZE];
530 coeffs_array d=(coeffs_array)r->data;
531 int i=0;
532 buf[0]='\0';
533 loop
534 {
535 char *s=d[i]->cfCoeffName(d[i]);
536 strncat(buf,s, SI_BUF_SIZE-strlen(buf)-strlen(s)-1);
537 i++;
538 if (d[i]==NULL) break;
539 strncat(buf," x ", SI_BUF_SIZE-strlen(buf)-4);
540 }
541 return omStrDup(buf);
542}
#define omStrDup(s)
Definition: omAllocDecl.h:263
int status int void * buf
Definition: si_signals.h:59

◆ nnCoeffWrite()

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

Definition at line 27 of file ntupel.cc.

28{
29 int i=0;
30 coeffs_array d=(coeffs_array)r->data;
31 loop
32 {
33 d[i]->cfCoeffWrite(d[i],b);
34 i++;
35 if (d[i]==NULL) break;
36 PrintS(" x ");
37 }
38}
void PrintS(const char *s)
Definition: reporter.cc:284

◆ nnCopy()

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

Definition at line 131 of file ntupel.cc.

132{
134 coeffs_array d=(coeffs_array)r->data;
135 int i=0;
136 loop
137 {
138 i++;
139 if (d[i]==NULL) break;
140 }
141 number *C=(number*)omAlloc(i*sizeof(number));
142 i=0;
143 loop
144 {
145 C[i]=d[i]->cfCopy(A[i],d[i]);
146 i++;
147 if (d[i]==NULL) return (number)C;
148 }
149}

◆ nnDBTest()

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

Definition at line 484 of file ntupel.cc.

485{
486 BOOLEAN bo=FALSE;
488 coeffs_array d=(coeffs_array)r->data;
489 int i=0;
490 loop
491 {
492 bo&=d[i]->cfDBTest(A[i],f,l,d[i]);
493 i++;
494 if (d[i]==NULL) return bo;
495 }
496}
int BOOLEAN
Definition: auxiliary.h:87
#define FALSE
Definition: auxiliary.h:96
int l
Definition: cfEzgcd.cc:100
FILE * f
Definition: checklibs.c:9

◆ nnDelete()

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

Definition at line 562 of file ntupel.cc.

563{
564 if (*a!=NULL)
565 {
566 coeffs_array d=(coeffs_array)r->data;
568 int i=0;
569 loop
570 {
571 d[i]->cfDelete(&(A[i]),d[i]);
572 i++;
573 if (d[i]==NULL) break;
574 }
575 omFreeSize(d,i*sizeof(number));
576 *a=NULL;
577 }
578}
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260

◆ nnDiv()

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

Definition at line 232 of file ntupel.cc.

233{
234 if (nnIsZero(b,r))
235 {
237 return nnInit(0,r);
238 }
241 coeffs_array d=(coeffs_array)r->data;
242 int i=0;
243 loop
244 {
245 i++;
246 if (d[i]==NULL) break;
247 }
248 number *C=(number*)omAlloc(i*sizeof(number));
249 i=0;
250 loop
251 {
252 C[i]=d[i]->cfDiv(A[i],B[i],d[i]);
253 i++;
254 if (d[i]==NULL) return (number)C;
255 }
256}
static BOOLEAN nnIsZero(number a, const coeffs r)
Definition: ntupel.cc:193
static number nnInit(long l, const coeffs r)
Definition: ntupel.cc:78
const char *const nDivBy0
Definition: numbers.h:87

◆ nnEqual()

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

Definition at line 320 of file ntupel.cc.

321{
322 int i=0;
325 coeffs_array d=(coeffs_array)r->data;
326 loop
327 {
328 if (!d[i]->cfEqual(A[i],B[i],d[i])) return FALSE;
329 i++;
330 if (d[i]==NULL) return TRUE;
331 }
332}
#define TRUE
Definition: auxiliary.h:100

◆ nnGreater()

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

Definition at line 302 of file ntupel.cc.

303{
306 coeffs_array d=(coeffs_array)r->data;
307 int i=0;
308 loop
309 {
310 if (d[i]->type==n_R) return d[i]->cfGreater(A[i],B[i],d[i]);
311 else if (d[i]->type==n_long_R) return d[i]->cfGreater(A[i],B[i],d[i]);
312 i++;
313 if (d[i]==NULL)
314 {
315 return d[i-1]->cfGreater(A[i],B[i],d[i-1]);
316 }
317 }
318}
@ n_R
single prescision (6,6) real numbers
Definition: coeffs.h:31
@ n_long_R
real floating point (GMP) numbers
Definition: coeffs.h:33

◆ nnGreaterZero()

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

Definition at line 41 of file ntupel.cc.

42{
43 int i=0;
44 coeffs_array d=(coeffs_array)r->data;
45 loop
46 {
47 if (d[i]->type==n_R) return d[i]->cfGreaterZero(k,d[i]);
48 if (d[i]->type==n_long_R) return d[i]->cfGreaterZero(k,d[i]);
49 i++;
50 if (d[i]==NULL) return d[i-1]->cfGreaterZero(k,d[i-1]);
51 }
52}
int k
Definition: cfEzgcd.cc:99

◆ nnInit()

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

Definition at line 78 of file ntupel.cc.

79{
80 coeffs_array d=(coeffs_array)r->data;
81 int i=0;
82 loop
83 {
84 i++;
85 if (d[i]==NULL) break;
86 }
87 number *C=(number*)omAlloc(i*sizeof(number));
88 i=0;
89 loop
90 {
91 C[i]=d[i]->cfInit(l,d[i]);
92 i++;
93 if (d[i]==NULL) return (number)C;
94 }
95}

◆ nnInitChar()

BOOLEAN nnInitChar ( coeffs  n,
void *  p 
)

Initialize r.

Definition at line 588 of file ntupel.cc.

589{
590 n->data=p;
591 n->type=n_nTupel;
592 n->is_field=TRUE;
593 n->is_domain=TRUE;
594
595 n->ch = 0;
596 n->cfCoeffString = nnCoeffString;
597 n->cfCoeffName = nnCoeffName;
598
599 n->cfInit = nnInit;
600 n->cfDelete = nnDelete;
601 n->cfInt = nnInt;
602 n->cfAdd = nnAdd;
603 n->cfSub = nnSub;
604 n->cfMult = nnMult;
605 n->cfDiv = nnDiv;
606 n->cfExactDiv= nnDiv;
607 n->cfInpNeg = nnInpNeg;
608 n->cfInvers= nnInvers;
609 n->cfCopy = nnCopy;
610 n->cfGreater = nnGreater;
611 n->cfEqual = nnEqual;
612 n->cfIsZero = nnIsZero;
613 n->cfIsOne = nnIsOne;
614 n->cfIsMOne = nnIsMOne;
615 n->cfGreaterZero = nnGreaterZero;
616 n->cfWriteShort = nnWriteShort;
617 n->cfWriteLong = nnWriteLong;
618 n->cfRead = nnRead;
619 //n->cfPower = nnPower;
620 n->cfSetMap = nnSetMap;
621 n->cfCoeffWrite = nnCoeffWrite;
622
623 n->cfChineseRemainder=nnChineseRemainder;
624 n->cfSize = nnSize;
625#ifdef LDEBUG
626 n->cfDBTest=nnDBTest;
627#endif
628 //n->nCoeffIsEqual = ndCoeffIsEqual;
629 return FALSE;
630}
int p
Definition: cfModGcd.cc:4078
@ n_nTupel
n-tupel of cf: ZZ/p1,... ZZ/pn, R, long_R
Definition: coeffs.h:42
static char * nnCoeffName(const coeffs r)
Definition: ntupel.cc:546
static BOOLEAN nnIsMOne(number a, const coeffs r)
Definition: ntupel.cc:219
static number nnCopy(number a, const coeffs r)
Definition: ntupel.cc:131
static number nnDiv(number a, number b, const coeffs r)
Definition: ntupel.cc:232
static number nnAdd(number a, number b, const coeffs r)
Definition: ntupel.cc:151
static void nnDelete(number *a, const coeffs r)
Definition: ntupel.cc:562
static number nnInpNeg(number a, const coeffs r)
Definition: ntupel.cc:283
static void nnWriteShort(number a, const coeffs r)
Definition: ntupel.cc:334
static BOOLEAN nnEqual(number a, number b, const coeffs r)
Definition: ntupel.cc:320
static long nnInt(number &n, const coeffs r)
Definition: ntupel.cc:100
static number nnMult(number a, number b, const coeffs r)
Definition: ntupel.cc:54
static BOOLEAN nnGreaterZero(number k, const coeffs r)
Definition: ntupel.cc:41
nMapFunc nnSetMap(const coeffs, const coeffs)
Definition: ntupel.cc:521
static const char * nnRead(const char *s, number *a, const coeffs r)
Definition: ntupel.cc:383
static BOOLEAN nnGreater(number a, number b, const coeffs r)
Definition: ntupel.cc:302
static number nnInvers(number a, const coeffs r)
Definition: ntupel.cc:258
static number nnSub(number a, number b, const coeffs r)
Definition: ntupel.cc:172
static void nnCoeffWrite(const coeffs r, BOOLEAN b)
Definition: ntupel.cc:27
static BOOLEAN nnIsOne(number a, const coeffs r)
Definition: ntupel.cc:206
static int nnSize(number n, const coeffs r)
Definition: ntupel.cc:113
static number nnChineseRemainder(number *, number *, int, BOOLEAN, CFArray &, const coeffs)
Definition: ntupel.cc:581
static void nnWriteLong(number a, const coeffs r)
Definition: ntupel.cc:348
static char * nnCoeffString(const coeffs r)
Definition: ntupel.cc:526
BOOLEAN nnDBTest(number a, const char *f, const int l, const coeffs r)
Definition: ntupel.cc:484

◆ nnInpNeg()

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

Definition at line 283 of file ntupel.cc.

284{
286 coeffs_array d=(coeffs_array)r->data;
287 int i=0;
288 loop
289 {
290 i++;
291 if (d[i]==NULL) break;
292 }
293 i=0;
294 loop
295 {
296 A[i]=d[i]->cfInpNeg(A[i],d[i]);
297 i++;
298 if (d[i]==NULL) return (number)A;
299 }
300}

◆ nnInt()

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

Definition at line 100 of file ntupel.cc.

101{
102 int i=0;
103 coeffs_array d=(coeffs_array)r->data;
104 loop
105 {
106 if (d[i]->type==n_R) return d[i]->cfInt(n,d[i]);
107 if (d[i]->type==n_long_R) return d[i]->cfInt(n,d[i]);
108 i++;
109 if (d[i]==NULL) return d[i-1]->cfInt(n,d[i-1]);
110 }
111}

◆ nnInvers()

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

Definition at line 258 of file ntupel.cc.

259{
260 if (nnIsZero(a,r))
261 {
263 return nnInit(0,r);
264 }
266 coeffs_array d=(coeffs_array)r->data;
267 int i=0;
268 loop
269 {
270 i++;
271 if (d[i]==NULL) break;
272 }
273 number *C=(number*)omAlloc(i*sizeof(number));
274 i=0;
275 loop
276 {
277 C[i]=d[i]->cfInvers(A[i],d[i]);
278 i++;
279 if (d[i]==NULL) return (number)C;
280 }
281}

◆ nnIsMOne()

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

Definition at line 219 of file ntupel.cc.

220{
221 int i=0;
223 coeffs_array d=(coeffs_array)r->data;
224 loop
225 {
226 if (!d[i]->cfIsMOne(A[i],d[i])) return FALSE;
227 i++;
228 if (d[i]==NULL) return TRUE;
229 }
230}

◆ nnIsOne()

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

Definition at line 206 of file ntupel.cc.

207{
208 int i=0;
210 coeffs_array d=(coeffs_array)r->data;
211 loop
212 {
213 if (!d[i]->cfIsOne(A[i],d[i])) return FALSE;
214 i++;
215 if (d[i]==NULL) return TRUE;
216 }
217}

◆ nnIsZero()

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

Definition at line 193 of file ntupel.cc.

194{
196 coeffs_array d=(coeffs_array)r->data;
197 int i=0;
198 loop
199 {
200 if (!d[i]->cfIsZero(A[i],d[i])) return FALSE;
201 i++;
202 if (d[i]==NULL) return TRUE;
203 }
204}

◆ nnMap()

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

Definition at line 499 of file ntupel.cc.

500{
501 coeffs_array d=(coeffs_array)r->data;
502 int i=0;
503 loop
504 {
505 i++;
506 if (d[i]==NULL) break;
507 }
508 number *C=(number*)omAlloc(i*sizeof(number));
509 nMapFunc nMap;
510 i=0;
511 loop
512 {
513 nMap=d[i]->cfSetMap(aRing,d[i]);
514 if (nMap==NULL) Werror("no map for compoment %d",i);
515 else C[i]=nMap(from,aRing,d[i]);
516 i++;
517 if (d[i]==NULL) return (number)C;
518 }
519}
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition: coeffs.h:73
void Werror(const char *fmt,...)
Definition: reporter.cc:189

◆ nnMult()

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

Definition at line 54 of file ntupel.cc.

55{
58 coeffs_array d=(coeffs_array)r->data;
59 int i=0;
60 loop
61 {
62 i++;
63 if (d[i]==NULL) break;
64 }
65 number *C=(number*)omAlloc(i*sizeof(number));
66 i=0;
67 loop
68 {
69 C[i]=d[i]->cfMult(A[i],B[i],d[i]);
70 i++;
71 if (d[i]==NULL) return (number)C;
72 }
73}

◆ nnRead()

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

Definition at line 383 of file ntupel.cc.

384{
385 // reading R/longR part, setting everything else to random
386 coeffs_array d=(coeffs_array)r->data;
387 int i=0;
388 loop
389 {
390 i++;
391 if (d[i]==NULL) break;
392 }
393 number *C=(number*)omAlloc0(i*sizeof(number));
394 *a=(number)C;
395 int is_zero=2; /*1: read 0, 2: read <> 0 */
396 int reader=-1;
397 i=0;
398 loop
399 {
400 if ((d[i]->type==n_R)
401 || (d[i]->type==n_long_R))
402 {
403 s=d[i]->cfRead(s,&(C[i]),d[i]);
404 is_zero=d[i]->cfIsZero(C[i],d[i]);
405 reader=i;
406 break;
407 }
408 i++;
409 if (d[i]==NULL)
410 {
411 s=d[i-1]->cfRead(s,&(C[i-1]),d[i-1]);
412 is_zero=d[i-1]->cfIsZero(C[i-1],d[i-1]);
413 reader=i-1;
414 break;
415 }
416 }
417 if (is_zero==0)
418 { // seting random values!=0 for Z/p
419 i=0;
420 loop
421 {
422 if (i!=reader)
423 {
424 if (d[i]->type==n_Zp)
425 {
426 int l=0;
427 do
428 {
429 l=siRand();
430 } while(l%(d[i]->ch)==0);
431 C[i]=d[i]->cfInit(l,d[i]);
432 }
433 else if ((d[i]->type==n_R)
434 || (d[i]->type==n_long_R))
435 {
436 nMapFunc nMap=d[i]->cfSetMap(d[reader],d[i]);
437 C[i]=nMap(C[reader],d[reader],d[i]);
438 }
439 else
440 {
441 WerrorS("reading is not suppiorted for such compinations of coeffs");
442 break;
443 }
444 }
445 i++;
446 if (d[i]==NULL) break;
447 }
448 }
449 else if (is_zero==1)
450 { // read a zero
451 i=0;
452 loop
453 {
454 C[i]=d[i]->cfInit(0,d[i]);
455 i++;
456 if (d[i]==NULL) break;
457 }
458 }
459 else if (reader==-1)/* not R or long_R*/
460 {
461 s=d[0]->cfRead(s,&(C[0]),d[0]);
462 i=1;
463 loop
464 {
465 if (d[i]==NULL) break;
466 i++;
467 {
468 nMapFunc nMap=d[i]->cfSetMap(d[0],d[i]);
469 C[i]=nMap(C[0],d[0],d[i]);
470 }
471 }
472 }
473 else
474 {
475 WerrorS("nnRead: should not happen");
476 }
477 return s;
478}
@ n_Zp
\F{p < 2^31}
Definition: coeffs.h:29
#define omAlloc0(size)
Definition: omAllocDecl.h:211
int siRand()
Definition: sirandom.c:42

◆ nnSetMap()

nMapFunc nnSetMap ( const  coeffs,
const  coeffs 
)

Definition at line 521 of file ntupel.cc.

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

◆ nnSize()

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

Definition at line 113 of file ntupel.cc.

114{
115 int s=0;
116 int i=0;
117 coeffs_array d=(coeffs_array)r->data;
118 loop
119 {
120 if (d[i]->type==n_R) s+=d[i]->cfSize(n,d[i]);
121 else if (d[i]->type==n_long_R) s+=d[i]->cfSize(n,d[i]);
122 i++;
123 if (d[i]==NULL)
124 {
125 if (s==0) return d[i-1]->cfSize(n,d[i-1]);
126 else return s;
127 }
128 }
129}

◆ nnSub()

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

Definition at line 172 of file ntupel.cc.

173{
176 coeffs_array d=(coeffs_array)r->data;
177 int i=0;
178 loop
179 {
180 i++;
181 if (d[i]==NULL) break;
182 }
183 number *C=(number*)omAlloc(i*sizeof(number));
184 i=0;
185 loop
186 {
187 C[i]=d[i]->cfSub(A[i],B[i],d[i]);
188 i++;
189 if (d[i]==NULL) return (number)C;
190 }
191}

◆ nnWriteLong()

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

Definition at line 348 of file ntupel.cc.

349{
351 coeffs_array d=(coeffs_array)r->data;
352 int i=0;
353 StringSetS("(");
354 loop
355 {
356 d[i]->cfWriteLong(A[i],d[i]);
357 i++;
358 if (d[i]==NULL) {StringAppendS(")"); return; }
359 else StringAppendS(",");
360 }
361}
void StringSetS(const char *st)
Definition: reporter.cc:128
void StringAppendS(const char *st)
Definition: reporter.cc:107

◆ nnWriteShort()

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

Definition at line 334 of file ntupel.cc.

335{
337 coeffs_array d=(coeffs_array)r->data;
338 int i=0;
339 loop
340 {
341 if (d[i]->type==n_R) { d[i]->cfWriteLong(A[i],d[i]); return; }
342 else if (d[i]->type==n_long_R) {d[i]->cfWriteLong(A[i],d[i]); return; }
343 i++;
344 if (d[i]==NULL) { d[i-1]->cfWriteLong(A[i-1],d[i-1]); return; }
345 }
346}

Variable Documentation

◆ nnCoeffName_buf

Definition at line 545 of file ntupel.cc.