Rev 7692 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if $wims_read_parm!=slib_header |
13586 | bpr | 2 | !goto proc |
20 | reyssat | 3 | !endif |
4161 | bpr | 4 | |
20 | reyssat | 5 | slib_parms=1\ |
6 | ,[data] or [data],[weight] |
||
4330 | bpr | 7 | slib_author=Adeline, Grelot |
4161 | bpr | 8 | |
3265 | bpr | 9 | slib_example=[1,2;3,4;3,5]\ |
20 | reyssat | 10 | [1,3,3],[2,4,5] |
3265 | bpr | 11 | slib_require=pari |
20 | reyssat | 12 | !exit |
13 | |||
14 | :proc |
||
15 | |||
16 | !readproc slib/stat/dataproc $wims_read_parm |
||
17 | !if $slib_cnt =0 |
||
18 | slib_out=0 |
||
19 | !exit |
||
20 | !else |
||
21 | !if $slib_weight=$empty |
||
22 | slib_data=!sum x for x in $slib_data |
||
23 | slib_out=$[($slib_data)/$slib_cnt],$slib_cnt |
||
24 | slib_out =!trim $slib_out |
||
25 | !exit |
||
26 | !else |
||
27 | slib_out=!exec pari print(([$slib_data]*[$slib_weight]~)/$slib_tw","$slib_tw); |
||
28 | slib_out =!trim $slib_out |
||
29 | !endif |
||
30 | !endif |