File: nu.doc

package info (click to toggle)
symmetrica 2.0+ds-6
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 9,456 kB
  • sloc: ansic: 97,289; makefile: 170; sh: 70
file content (673 lines) | stat: -rw-r--r-- 16,474 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
COMMENT:
	NUMERIC STANDARD ROUTINES
	-------------------------



NAME:           
	absolute
SYNOPSIS:      
	INT absolute(OP in, out)
DESCRIPTION:    
	computes the absolute value, it works for
       BRUCH,INTEGER,LONGINT,MATRIX, VECTOR  objects.
BUGS:       
	The variables in and out must be different. It doesnt
       work for SQ_RADICAL and CYCLOTOMIC



NAME:           
	add
SYNOPSIS:       
	INT add(OP a,b,c)
DESCRIPTION:    
	adds the objects a and b and the result is c
	It also works with a,b,c not different. First there is a 
        check whether a or b is an empty object, if yes the 
        second one is copied to the first one, and the routine 
        finishes. Then the result object c is freed. 
        Then there is a call to the specific add routine for the 
        entered objects.
        It work for the following kinds:
        MONOPOLY, CYCLOTOMIC, SQ_RADICAL, GEN_CHAR, INTEGER,
        PARTITION, GRAL, POLYNOM, MONOM, VECTOR, SCHUR, LONGINT,
        MATRIX, KRANZTYPUS, HOM_SYM, SCHUBERT, SYMCHAR, BRUCH, 
	REIHE, FINITEFIELD
RETURN:         
	OK or ERROR
BUGS:          
	 not all possible combinations are implemented
        If you enter for example add(a,a,a) with a a POLYNOM
        object, there is first a copy then an addition,
        even if a merge would be faster. In this case you should use
	add_apply



NAME:           
	add_apply
SYNOPSIS:       
	INT add_apply(OP a,b)
DESCRIPTION:    
	add a to b, a and b may be equal. It works 
	for the following types
	BRUCH, GRAL, INTEGER, LONGINT, MATRIX, KRANZTYPUS, 
	SCHUBERT, SCHUR, SYMCHAR, MONOPOLY, CYCLOTOMIC, 
	SQ_RADICAL, POLYNOM, VECTOR, FINITEFIELD, REIHE
RETURN:     
	OK or ERROR
BUGS:   
	not all combinations are working


NAME:           
	addinvers
SYNOPSIS:       
	INT addinvers(OP a,b)
DESCRIPTION:    
	b becomes the additive inverse of the
	object a. a and b may be equal. b is freed first
        It work for the following kind of objects:
	BRUCH, CYCLOTOMIC, HOM_SYM, FINITEFIELD,
	INTEGER, LONGINT, MONOM
        MONOPOLY, GRAL, POLYNOM, SCHUBERT, SCHUR, SQ_RADICAL,
        SYMCHAR, VECTOR
	cf. also addinvers_apply
RETURN:
	         OK or ERROR
BUGS:  
	         if a and b are equal we make no use of it
	May be some types are missing e.g. MATRIX


NAME:     
	      addinvers_apply
SYNOPSIS: 
	      INT addinvers_apply(OP a)
DESCRIPTION: 
	   a is changed to the additve invers of a, this 
	works for the following types:
	BRUCH CYCLOTOMIC ELM_SYM FINITEFIELD 
	HOM_SYM INTEGER LONGINT MONOM
	GRAL POLYNOM SCHUR SQ_RADICAL SYMCHAR VECTOR
RETURN: 
	    OK or ERROR


NAME:  
	         binom
SYNOPSIS:
	       INT binom(OP a,b,c)
DESCRIPTION:
	    c becomes the binomial coefficient "a choose b" 
	It also works for negative values for oben. The varaibles
        a b c may be equal. b must be >= 0. c is freed first.
	The object a may INTEGER or POLYNOM. The object b must
	be INTEGER.
BUGS:  
	          It works only for INTEGER objects. Not for 
	LONGINT




NAME: 
	          conjugate
SYNOPSIS:
	       INT conjugate(OP in, out)
DESCRIPTION:
	 computes the conjugate partition, it works for
	PARTITION and SKEWPARTITION.
	the variables in and out may be equal. In the case of
        a wrong input you gat an error message. The variable out is freed
        before the computation.
	It also works for SCHUR and the other symmetric functions, here it
	is applied to the partitions labeling one summand.
	Other symmetric functions are: HOM_SYM, ELM_SYM, POW_SYM, MONOMIAL
RETURN:
	         OK or ERROR in the case of an error
BUGS:  
	         should work for CYCLOTOMIC, 
	also for GRAL and PERMUTATION and MATRIX (but different parameters)
EXAMPLE:
	......
        a = callocobject();
	b = callocobject();
	scan(PARTITION,a);
	conjugate(a,b);
	println(b);
	......	



NAME:
	           dec
SYNOPSIS:
	       INT dec(OP a)
DESCRIPTION:
	    decrease a by one, if a is INTEGER or
	LONGINT. In the case of a VECTOR, PERMUTATION,
	PARTITION, the last element is discarded.
RETURN:
	         OK or ERROR


NAME:
	           det
SYNOPSIS: 
	      INT det(a,b)
DESCRIPTION:
	    computes the determinant of the MATRIX a. a may also
	be of type KRANZTYPUS. a and b may be equal, b is freed first.
BUGS:  
	      it uses an algorithm with triangulisation, so it works
	only for entries which allow the routine div.
	To avoid this algorithm use det_mat_imm



NAME:   
	        dimension
SYNOPSIS:
	       INT dimension(OP label, result)
DESCRIPTION: 
	Computes the dimension of the representation of the symmetric
	group labeled by the input. It works for the following input
	objects: PARTITION, SCHUR, SKEWPARTITION, AUGPART, SCHUBERT.
	label and result may be equal. result is freed first
RETURN:
	        OK or ERROR


NAME: 
	          div
SYNOPSIS:
	       INT div(a,b,c)
DESCRIPTION:
	    computes c = a/b. It is exact division, it
	means that the division of to INTEGERS or LONGINTS
	gives a BRUCH object. If you want to avoid this use
	ganzdiv. The routine uses invers and mult, so it 
	works for all objects which have invers and mutl
	defined.
RETURN:
	          OK or ERROR


NAME: 
	          fakul
SYNOPSIS:
	       INT fakul(OP a,b)
DESCRIPTION: 
	   b becomes a!. a is an INTEGER object. a must
	be >= 0.  a and b may be equal. b is freed first.
BUGS:  
	         LONGINT should be possible for a.
RETURN: 
	        OK or ERROR
EXAMPLE:
	#include "def.h"
	#include "macro.h"

	main()
	{
	OP b,h2;
	anfang();
	b=callocobject(); h2=callocobject(); 
	scan(INTEGER,h2); fakul(h2,b); println(b);
	freeall(b); freeall(h2);
	ende();
	}


NAME:
	           ganzdiv
SYNOPSIS:
	       INT ganzdiv(a,b,c)
DESCRIPTION:
    computes the integer part of the division a / b.
	it works for INTEGER and LONGINT a and b. The varaibles
        a b c may be equal. c is freed first. You must be careful
	if you have a negativ object a. you compute the next smaller
	INTEGER, so a=-5, b=2 ==> c=-3. comprae this with INT quores().
RETURN: 
    OK or ERROR
BUGS:
       sometimes you have POLYNOM etc. objects, which are
        integers, but you can not use this routine.
	e.g. the POLYNOM 4 [0,0,0] is the INTEGER object 4.


NAME:
	           ganzsquareroot
SYNOPSIS: 
	      INT ganzsquareroot(a,b)
DESCRIPTION: 
	   computes the integer part of the squareroot of the
         input object a. The result is in b, which is freed first.
         It works for INTEGER objects a.
         The variables a and may be equal.
BUGS:  
	          It doesnt work for LONGINT objects.
RETURN:
	         OK or ERROR.


NAME: 
	          ggt
SYNOPSIS: 
	      INT ggt(a,b,c)
DESCRIPTION:
	    computes the gcd of a and b the result is c.
	The variables a b c may be equal. c is freed first.
	The routine works for all objects which allow
	absolute, posp, comp, mod, addinvers, negp
	so it works only for INTEGER and LONGINT
RETURN:
	         OK or ERROR
BUGS:  
	     POLYNOM would be useful



NAME:
	           hoch
SYNOPSIS:
	       INT hoch(OP basis,exponent,result)
DESCRIPTION: 
	   computes basis^exponent to result. result is
	freed to an empty object first. The variables basis
	exponent and result may be equal. Following
	types are allowed
	exponent:     INTEGER
 	              LONGINT
	basis:        all types, which can be multiplied using
		mult_apply
	The input variables may be equal. The exponent may be a negative
	value.
RETURN:
	         OK if no error
	ERROR else.


NAME: 
	          inc
SYNOPSIS:
	       INT inc(OP a)
DESCRIPTION: 
	   increase a by one, if a is INTEGER or
	LONGINT. In the case of VECTOR an empty object is appended.
	The same in the case of PARTITION object. In the case of an
	PERMUTATION object, there will be inserted  a leading
        fixpoint. In the case of MATRIX or KRANZTYPUS object there
	will be a further column and a further row at the ends, with
        empty objects. In the case of REIHE it computes the next
	coefficient.
RETURN:
	       OK or ERROR
BUGS:  
	       may be also useful for BRUCH, SQ_RADICAL, CYCLOTOMIC
	(addition of 1)


NAME:   
	        inhalt
SYNOPSIS: 
	      INT inhalt(OP a,b)
DESCRIPTION:   
	 computes the content of a TABLEAUX or a WORD object. 
	The content must be INTEGER object >= 1. First b ist
	freed. a and b may be equal. b becomes a VECTOR object
RETURN:
			OK or ERROR



NAME: 
	          invers
SYNOPSIS:
	       INT invers(OP a,b)
DESCRIPTION:
	    computes the multiplicative inverse of the
	object a. It works for BRUCH, CYCLOTOMIC,
	INTEGER, FINITEFIELD, LONGINT, MATRIX, KOSTKA, KRANZTYPUS,
        PERMUTATION, SQ_RADICAL.
	a nd b may be equal. b is freed first.
RETURN:
	         OK or ERROR



NAME:  
	         invers_apply
SYNOPSIS: 
	      INT invers_apply(OP a)
DESCRIPTION:  
	  changes a to its multiplicative inverse. It works
	for INTEGER, in all other cases it calls invers.
RETURN:
	         OK or ERROR
BUGS:  
	         more types should be implemented.


NAME:   
	        kgv
SYNOPSIS:
	       INT kgv(a,b,c)
DESCRIPTION: 
	   computes the lcm of the input objects a and b.
         The result is stored in c. The routine needed ar ggt
         mult and div
RETURN:
	         OK or ERROR


NAME:  
	         lehmercode
SYNOPSIS:
	       INT lehmercode(OP a,b)
DESCRIPTION:
	    computes the lehmercode of the object a. a may
	be a PERMUTATION object or an VECTOR object. The
        VECTOR object must contain INTEGER objects. the variables
        a and b may be equal. b is freed first.
RETURN:
	   OK or ERROR
BUGS:  
	   there is no test on INTEGER objects in the VECTOR objects.
	lehmercode for barred permutations is missing



NAME:  
	         length
SYNOPSIS:
	       INT length(OP a,b)
DESCRIPTION: 
	   computes the length of LIST type objects or
	VECTOR type objects. So it works for the following 
        types
	GRAL HOM_SYM LIST POLYNOM MONOPOLY SCHUBERT SCHUR 
	PARTITION PERMUTATION  SKEWPARTITION VECTOR WORD
        COMP
	a and b may be equal.
BUGS:  
			It doesnt work for SQ_RADICAL CYCLOTOMIC
RETURN:	
		OK if there is no error, else != OK


NAME: 
	          max
SYNOPSIS:
	       INT max(OP a,b)
DESCRIPTION: 
	   b becomes a copy of the maximum object in a.
	It works for MATRIX,VECTOR,WORD objects. If we have the
	wrong type it prints an error message
RETURN:
	         OK or ERROR
BUGS:  
	 the variables a and b must be different. The routine does not
        work for LIST, BINTREE
        It would be useful to enter a function for comparision.
        It would be useful to have a routine min


NAME:  
	         mod  
SYNOPSIS:
	       INT mod(OP a,b,c)
DESCRIPTION:
	 Computes a mod b, where a,b could be out of INTEGER or
	LONGINT. The result is always positive,
	12 mod 5 = 2
	-12 mod 5 = 3
	12 mod -5 = 2
        -12 mod -5 = 3
	The variables a b c may be equal, c is freed first
	The routine also works if the first parameter is a MATRIX
	object and the second parameter is a INTEGER object, in this
	case the routine is applied to all entries of the matrix.
RETURN:
			ERROR if b is 0
BUGS:  
	   MONOPOLY and POLYNOM would be useful




NAME:	
		moebius
SYNOPSIS:
		INT moebius(OP a,b)
DESCRIPTION:
		computes the number theoretic moebius function of
	the input object a.




NAME:   
        mult
SYNOPSIS:  
	     INT mult(OP a,b,c)
DESCRIPTION:
	    it multiplies the two objects a and b and the result will
	be in c. First there is a check whether a,b,c not NULL then 
        whether a and b are no empty objects. Then it frees the object c.
	Now it multiplies. It is not necessary, that a,b,c are different.
	See also mult_apply();
	Multiplies two objects, and the result is a new object. Look
	at the following list of possible datatypes.
	BRUCH,CYCLOTOMIC,GRAL,FINITEFIELD, HOM_SYM,
	INTEGER,KRANZTYPUS,KOSTKA,LONGINT,MATRIX,MONOPOLY
	PERMUTATION,POLYNOM,SCHUR,SCHUBERT,REIHE
	SYMCHAR,SQ_RADICAL,VECTOR.
RETURN:
	         OK or ERROR
BUGS:  
	 many combinations are missing
EXAMPLE:
	main() {
	OP a = callocobject();
	OP b = callocobject();
	scan(POLYNOM,a);
	scan(BRUCH,b);
	mult(a,b,b); println(b);
	freeall(a);
	freeall(b);
	}
	This example multiplies a BRUCHobject and a POLYNOMobject, which 
	gives a POLYNOMobject with BRUCHobjects as coefficients.


NAME:
	           mult_apply
SYNOPSIS:
	       INT mult_apply(OP a,b)
DESCRIPTION:
	    mult a to b, at the moment this works for the following
	types of a: BRUCH GRAL INTEGER LONGINT MONOPOLY CYCLOTOMIC 
	REIHE
	MATRIX POLYNOM REIHE SCHUBERT SCHUR SQ_RADICAL SYMCHAR
	SQ_RADICAL VECTOR. 
	a and b may be equal
RETURN:
	       OK or ERROR
BUGS:  
	       not all combinations are implemented



NAME:
			multinom
SYNOPSIS:
		INT multinom(OP a,b,c)
DESCRIPTION:
		missing



NAME: 
	          qdimension
SYNOPSIS:
	       INT qdimension(OP label, result)
DESCRIPTION:
	 Computes the qdimension of the representation of the symmetric
	group labeled by the input. It works for the following input
	objects: SCHUBERT.
	label and result may be equal. result is freed first
RETURN:
	        OK or ERROR


NAME:
	           quores
SYNOPSIS: 
	      INT quores(OP a,b,c,d)
DESCRIPTION:
	    c becomes the result of the integer division a by b.
	d becomes the result of a mod b
	types of a,b: INTEGER
		      LONGINT
	c and d must be different, the remaining varaibales may be
	equal. c and d are freed first.
BUGS:  
	         POLYNOM, MONOPOLY would be useful


NAME:       
	    scalarproduct
SYNOPSIS: 
	      INT scalarproduct(OP a,b,c)
DESCRIPTION:
	    c becomes the scalarproduct of a and b. This works
	for VECTOR objects, where it is the euklidean and for
	SYMCHAR objects, where it is the scalarproduct of two 
	characters of the symmetric group.  It works also for
	SCHUR objects.
	a b c may be equal, c is freed first.
BUGS:  
	   The scalarproduct of vector, works only for
	reell entries, not for CYCLOTOMIC


NAME: 
	          signum
SYNOPSIS:
	       INT signum(OP a,b)
DESCRIPTION:
	   b becomes the signum of the PERMUTATION object a.
        b is freed first.
BUGS:  
	         a and b must be different


NAME:
	           sort
SYNOPSIS:
	       INT sort(OP a)
DESCRIPTION:
	    the VECTOR object a is sorted by comp().
RETURN:
	         OK or ERROR
BUGS:  
	         should work also for LIST and BINTREE
      it should be possible to specify the comp - function
      As for CYCLOTOMIC and SQ_RADICAL we do not have comp 
      you will get problems with such entries.


NAME:  
	         squareroot
SYNOPSIS:
	       INT squareroot(OP a,b)
DESCRIPTION: 
	   b becomes the squareroot of a. It works for
       INTEGER, LONGINT, BRUCH. If the input is not quadratic
       the output is a object of type SQ_RADICAL. 
       The variables a and b may be equal.
RETURN:
	         OK or ERROR



NAME:    
	       sub
SYNOPSIS:
	       INT sub(OP a,b,c)
DESCRIPTION:
	    c = a - b 
	computes the difference of two objects, it first calls
	the routine addinvers, then the routine add, so it is limited
	two the objects which can be handled by these two routines.
	The input varaibles may be equal.
	There is a check on errors during the computation.
RETURN:
	          OK or ERROR



NAME:  
	         sum
SYNOPSIS:  
	     INT sum(OP a,b)
DESCRIPTION:
	    b becomes the sum of the VECTOR object a. It must
         be possible to add the entries. a and b may be equal. b
         is freed first. It also works for COMP objects.
RETURN:
	         OK or ERROR
BUGS:  
	         it would be good to have the same for LIST and
         BINTREE objects.


NAME:
	           trace
SYNOPSIS:
	       INT trace(OP a,b)
DESCRIPTION:
	    a is a MATRIX object. So also the type KRANZTYPUS
	works for a. a and b may be equal. b is freed first.
	b becomes the sum over the diagonal elements of the matrix.
RETURN:
	        OK or ERROR


NAME: 
	          transpose
SYNOPSIS: 
	      INT transpose(OP a,b)
DESCRIPTION:
	    computes the transpose of a MATRIX object a.
        It also works for KOSTKA and KRANZTYPUS, which are also MATRIX
        objects. The variable a and b may be equal.
RETURN:
	         OK or ERROR


NAME:
	           vander
SYNOPSIS: 
	      INT vander(OP a,b)
DESCRIPTION: 
	   a is a INTEGER object, and b becomes the 
	POLYNOM object, which is the determinant of the 
	vandermonde matrix. Only reasonable for small 
	values of a.
BUGS:  
	   a and b must be different. Slow algorithm.


NAME:
	           weight
SYNOPSIS:
	       INT weight(OP a,b)
DESCRIPTION:
	    b becomes the wheight of a. This works
	a of type AUG_PART,PARTITION, SKEWPARTITION, TABLEAUX.
	a and b may be equal variables. b is freed first