Subversion Repositories wimsdev

Rev

Rev 7193 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7193 Rev 12038
Line 7... Line 7...
7
 ,[a_1,...,a_m]
7
 ,[a_1,...,a_m]
8
slib_author=Adeline, Grelot; Bernadette, Perrin-Riou
8
slib_author=Adeline, Grelot; Bernadette, Perrin-Riou
9
 
9
 
10
slib_example=[1,1,1,3,4,5,6,2],[1,4]\
10
slib_example=[1,1,1,3,4,5,6,2],[1,4]\
11
[1,1,1,3,4,5,6,2],[1,4,6]\
11
[1,1,1,3,4,5,6,2],[1,4,6]\
-
 
12
[1,1,1,3,6,2],[1,4,5,6]\
12
[1,1,1,3,4,5,6,2,7,4,7],[2,3,6]\
13
[1,1,1,3,4,5,6,2,7,4,7],[2,3,6]\
13
[1,1,1,3,4,5,6,2]\
14
[1,1,1,3,4,5,6,2]\
14
[1,1,2]
15
[1,1,2]\
-
 
16
[1,1.5,2.7,0,3,5.5,4]
15
 
17
 
16
!exit
18
!exit
17
:proc
19
:proc
18
slib_out=
20
slib_out=
19
 
-
 
-
 
21
!reset slib_END1 slib_END
20
!readproc slib/stat/dataproc $wims_read_parm
22
!distribute items $wims_read_parm into slib_data,slib_w
21
 
-
 
22
slib_v=!declosing $slib_data
23
slib_v=!declosing $slib_data
23
slib_w=!declosing $slib_weight
24
slib_w=!declosing $slib_w
24
!if $slib_v$slib_w=$empty
25
!if $slib_v$slib_w=$empty
25
   slib_out=0
26
   slib_out=0
26
   !exit
27
   !exit
27
!else
28
!else
28
   slib_v=!sort numeric item $slib_v
29
   slib_v=!sort numeric item $slib_v
Line 64... Line 65...
64
  # creer un nouveau point de separation
65
  # creer un nouveau point de separation
65
:point
66
:point
66
         !advance slib_wpointer
67
         !advance slib_wpointer
67
         slib_end=!item $slib_wpointer of $slib_w
68
         slib_end=!item $slib_wpointer of $slib_w
68
         !if $slib_wpointer < $slib_cntw
69
         !if $slib_wpointer < $slib_cntw
69
             slib_end1=!item $[$slib_wpointer+1] of $slib_w
70
             slib_end1=!item $[$slib_wpointer] of $slib_w
70
         !else
71
         !else
71
             slib_end1=$[$slib_end+2]
72
             slib_end1=$[$slib_end+1]
72
         !endif
73
         !endif
-
 
74
         slib_END1=!append item $slib_end1 to $slib_END1
-
 
75
         slib_END=!append item $slib_end to $slib_END
73
         slib_result=!append item $[$slib_cpt] to $slib_result
76
         slib_result=!append item $[$slib_cpt] to $slib_result
74
         !ifval $slib_dat>=$slib_end1
77
         !ifval $slib_dat>=$slib_end1
75
            slib_cpt=0
78
            slib_cpt=0
76
            !goto point
79
            !goto point
77
         !else
80
         !else
Line 86... Line 89...
86
      slib_result=$slib_result,$slib_zero
89
      slib_result=$slib_result,$slib_zero
87
   !endif
90
   !endif
88
!endif
91
!endif
89
slib_out=!trim $slib_result
92
slib_out=!trim $slib_result
90
slib_out=!line -1 of $slib_out
93
slib_out=!line -1 of $slib_out
91
slib_out=[$slib_out],[$slib_w]
94
slib_out=[$slib_out],[$slib_w], [$slib_END], [$slib_END1]