Rev 4330 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if $wims_read_parm!=slib_header |
2 | !goto proc |
||
3 | !endif |
||
4161 | bpr | 4 | |
20 | reyssat | 5 | slib_parms=2\ |
6 | 2,m\ |
||
7 | 2*m,N\ |
||
8 | R, K |
||
7692 | bpr | 9 | |
4330 | bpr | 10 | slib_author=Sophie, Lemaire; Bernadette, Perrin-Riou |
4161 | bpr | 11 | |
20 | reyssat | 12 | slib_example= 5,10\ |
13 | 7,10,Q |
||
3265 | bpr | 14 | slib_require=pari |
3307 | bpr | 15 | !exit |
20 | reyssat | 16 | :proc |
17 | !distribute item $wims_read_parm into slib_mm,slib_NN,slib_K |
||
18 | |||
19 | !default slib_mm=2 |
||
20 | !default slib_NN=$[2*$slib_mm] |
||
21 | !default slib_K= R |
||
22 | |||
23 | !if $slib_mm = 1 |
||
24 | slib_out = 1 |
||
25 | !else |
||
26 | slib_cc = !values 1/$slib_mm for x = 1 to $[$slib_mm-1] |
||
27 | |||
28 | !readproc slib/stat/multinomial 1, $[$slib_NN], $slib_cc |
||
29 | slib_vv= $slib_out |
||
30 | |||
31 | !if $slib_K issametext Q |
||
7692 | bpr | 32 | slib_out=!exec pari slib_a=Vec([$slib_vv]);vector($slib_mm, x,slib_a[x]/$slib_NN) |
20 | reyssat | 33 | !else |
34 | slib_out=!values x/$slib_NN for x in $slib_vv |
||
7692 | bpr | 35 | !endif |
20 | reyssat | 36 | !endif |
37 | |||
7692 | bpr | 38 | slib_out =!trim $slib_out |