Rev 12676 | Blame | Compare with Previous | Last modification | View Log | RSS feed
!if $wims_read_parm!=slib_header
!goto proc
!endif
slib_author=Bernadette, Perrin-Riou
slib_example=[0,1,0,0;1,0,0,0;0,0,0,1;0,0,1,0]
slib_require=pari
!exit
:proc
slib_G= $wims_read_parm
slib_G=!declosing $slib_G
slib_G=!translate internal $\
$ to ; in $slib_G
slib_n=!exec pari slib_N=Mat([$slib_G]);matsize(slib_N)[1]
slib_G= !exec pari slib_N=Mat([$slib_G]); matrix($slib_n,$slib_n,i,j, max(slib_N[i,j],slib_N[j,i]))
slib_cnt=0
slib_liste=
slib_matrix=
slib_out=
!for slib_i=1 to $slib_n
!if $slib_i notitemof $slib_liste
!readproc slib/graph/connexcomponent [$slib_G],$slib_i
slib_liste=!append item $slib_out to $slib_liste
!advance slib_cnt
slib_matrix=!append line $slib_out to $slib_matrix
slib_out=
!endif
!next slib_i
slib_matrix=!translate internal $\
$ to ; in $slib_matrix
slib_out= $slib_cnt,[$slib_matrix]