\\ Elements of v not contained in Sep. t_compressv (v,Sep=[" "]) = [x | x<-v, !pos(x,Sep)] \\ Vector v expanded to a vector of length s, where \\ positions i not contained in P are filled with sep. t_expandv (v,s,P,sep=" ") = {my (u,x,k=1); u=[]; for (i=1,s, if (!pos(i,P), x=sep, x=v[k]; k++);\ u=concat(u,[x])); u} \\ Matrix with gaps. s is the total number of columns shown. \\ n is the number of rows. R(i-1) is defined for 0<=i-1<=n-1 \\ and such that 1<=R(i-1)<=s and R(i-1)-1 divides s-R(i-1) for \\ all such i. E(i-1,t-1) is defined for 0<=t-1<=R(i-1)-1. t_mwg (E,s,n,R,sep=" ",format="%s") =\ matrix(n,s,i,j,t_vwg(vector(R(i-1),t,E(i-1,t-1)),s,sep=sep,format=format)[j]) \\ Vector with gaps. s is the total number of elements shown. \\ With r:=#v it is required that r-1 divides s-r. t_vwg (v,s,sep=" ",format="%s") = {my (r,d); r=#v; d=(s-r)\(r-1); vector(s,i, if ((i-1)%(d+1),Strprintf(format,sep), Strprintf(format,v[(i-1)\(d+1)+1])))}