tipo_de_macro=R2
Idioma=español
id='RES' matriz='sí' evaluar='una-sola-vez' columnas='10' filas='200' expresión=';' 
id='RES.n' vector='sí' evaluar='una-sola-vez' tamaño='20' 
id='R' matriz='sí' evaluar='una-sola-vez' columnas='3' filas='3' expresión='R[0,0]=0;R[1,0]=0;R[2,0]=0;R[0,1]=0;R[1,1]=0;R[2,1]=0;R[0,2]=0;R[1,2]=0;R[2,2]=0;' 
id='S' matriz='sí' evaluar='una-sola-vez' columnas='3' filas='3' expresión='S[0,0]=0;S[1,0]=0;S[2,0]=0;S[0,1]=0;S[1,1]=0;S[2,1]=0;S[0,2]=0;S[1,2]=0;S[2,2]=0;' 
id='R.add(a,b)' algoritmo='sí' expresión='0' local='doAdd' hacer='doAdd=R.indexOf(a,b);doAdd=(doAdd<0);R[R.n,0]=(doAdd)?a:R[R.n,0];R[R.n,1]=(doAdd)?b:R[R.n,1];R.n=R.n+(doAdd)' 
id='R.indexOf(a,b)' algoritmo='sí' expresión='(R.n<=0)?-1:res' local='i,res,isRel' inicio='i=0;res=-1' hacer='isRel=(R[i,0]==a)&(R[i,1]==b);res=(isRel)?i:res;i=i+1' mientras='(i<R.n)&(res<0)' 
id='S.add(a,b)' algoritmo='sí' expresión='0' local='doAdd' hacer='doAdd=S.indexOf(a,b);doAdd=(doAdd<0);S[S.n,0]=(doAdd)?a:R[S.n,0];S[S.n,1]=(doAdd)?b:R[S.n,1];S.n=S.n+(doAdd)' 
id='S.indexOf(a,b)' algoritmo='sí' expresión='(S.n<=0)?-1:res' local='i,res,isRel' inicio='i=0;res=-1' hacer='isRel=(S[i,0]==a)&(S[i,1]==b);res=(isRel)?i:res;i=i+1' mientras='(i<S.n)&(res<0)' 
id='RES.add(idxRes,a,b,idOrigR,idOrigS)' algoritmo='sí' expresión='doAdd' local='doAdd,N,i' hacer='N=RES.n[idxRes];i=(idxRes*RES.maxN)+N;;doAdd=RES.indexOf(idxRes,a,b);doAdd=(doAdd<0);;RES[i,0]=(doAdd)?      a:RES[i,0];RES[i,1]=(doAdd)?      b:RES[i,1];RES[i,2]=(doAdd)?idOrigR:RES[i,2];RES[i,3]=(doAdd)?idOrigS:RES[i,3];;RES.n[idxRes]=(N+doAdd);' 
id='RES.indexOf(idxRes,a,b)' algoritmo='sí' expresión='(N<1)?-1:res' local='j,res,isRel,N,jMax' inicio='j=(idxRes*RES.maxN);res=-1;N=RES.n[idxRes];jMax=N+j' hacer='isRel=(RES[j,0]==a)&(RES[j,1]==b);res=(isRel)?j:res;j=j+1' mientras='(j<jMax)&(res<0)' 
id='componer(idxRes)' algoritmo='sí' expresión='0' local='i,Ra,Rb,cont' inicio='i=0;RES.n[idxRes]=0' hacer='Ra=R[i,0];Rb=R[i,1];componerAux(idxRes,i,Ra,Rb);i=i+1;cont=(i<R.n);' mientras='cont' 
id='componerAux(idxRes,idxR,Ra,Rb)' algoritmo='sí' expresión='0' local='j,Sa,Sb,cond,idxS,nAnt,s,tt,tt2' inicio='j=0;' hacer='Sa=S[j,0];Sb=S[j,1];ö=|**************************************************|;ö=|* Si tenemos (a,b), (b,c) agregamos a RES (a,c) **|;ö=|**************************************************|;tt=(Rb==Sa)?RES.add(idxRes,Ra,Sb,idxR,j):0;j=j+1' mientras='j<S.n' 
id='unir(idxRes)' algoritmo='sí' expresión='0' local='i,Ra,Rb,cont' inicio='i=0;RES.n[idxRes]=0' hacer='Ra=R[i,0];Rb=R[i,1];RES.add(idxRes,Ra,Rb,i,-1);i=i+1;cont=(i<R.n);;ö=|**************************************************|;ö=|* Si ya tenemos todas las de R, agregamos ahora  *|;ö=|* las relaciones en S.                        ****|;ö=|**************************************************|;tt=(cont)?0:unirAux(idxRes);' mientras='cont' 
id='unirAux(idxRes)' algoritmo='sí' expresión='0' local='i,Sa,Sb,cont' inicio='i=0' hacer='Sa=S[i,0];Sb=S[i,1];RES.add(idxRes,Sa,Sb,-1,i);i=i+1;' mientras='(i<S.n)' 
id='RES.getElement(idxRes,idxE)' algoritmo='sí' expresión='(RES.n[idxRes]>0)&(RES.n[idxRes]>idxE)' local='i' hacer='i=idxRes*RES.maxN+idxE;res.a= RES[i,0];res.b= RES[i,1];res.Ri=RES[i,2];res.Si=RES[i,3]' 
id='R.loadFromRes(idxRes)' algoritmo='sí' expresión='0' local='i,N,initRes,iRes' inicio='i=0;N=RES.n[idxRes];R.n=N;initRes=idxRes*RES.maxN' hacer='RES.getElement(idxRes,i);R[i,0]=res.a;R[i,1]=res.b;i=i+1' mientras='i<N' 
id='S.loadFromRes(idxRes)' algoritmo='sí' expresión='0' local='i,N' inicio='i=0;N=RES.n[idxRes];S.n=N;' hacer='RES.getElement(idxRes,i);S[i,0]=res.a;S[i,1]=res.b;i=i+1' mientras='i<N' 
id='R.loadFromS()' algoritmo='sí' expresión='0' local='i,N,initRes,iRes' inicio='i=0;N=S.n;R.n=N;' hacer='R[i,0]=S[i,0];R[i,1]=S[i,1];i=i+1' mientras='i<N' 
id='S.loadFromR()' algoritmo='sí' expresión='0' local='i,N' inicio='i=0;N=R.n;S.n=N;' hacer='S[i,0]=R[i,0];S[i,1]=R[i,1];i=i+1' mientras='i<N' 
id='INICIO' algoritmo='sí' evaluar='una-sola-vez' hacer='debug=1;txt.x=50;txt.y=20;R.n=0;S.n=0;;RES.maxN=25;;;R.add(&squot;a&squot;,&squot;b&squot;);R.add(&squot;c&squot;,&squot;d&squot;);R.add(&squot;a&squot;,&squot;c&squot;);R.add(&squot;a&squot;,&squot;c&squot;);;;S.add(&squot;b&squot;,&squot;e&squot;);S.add(&squot;d&squot;,&squot;j&squot;);S.add(&squot;b&squot;,&squot;c&squot;);S.add(&squot;c&squot;,&squot;2&squot;);S.add(&squot;b&squot;,&squot;c&squot;);S.add(&squot;a&squot;,&squot;c&squot;);;unir(iRes)' 
id='CALCULOS' algoritmo='sí' evaluar='siempre' 
espacio='E1' tipo='texto' fondo='no' color='20303a' dibujar-si='debug' expresión='[txt.x,txt.y]' texto='R.n = [R.n]' decimales='2' fijo='no' ancho='1' fuente='SansSerif,PLAIN,18' align='a_left' anchor='a_top_left' 
espacio='E1' tipo='texto' fondo='no' color='20303a' dibujar-si='debug' expresión='[txt.x,txt.y+30+16*s]' familia='s' s.intervalo='[0,R.n-1]' s.pasos='R.n-1' texto='[s]: ([R[s,0]],[R[s,1]])' decimales='2' fijo='no' ancho='1' fuente='Monospaced,BOLD,14' align='a_left' anchor='a_top_left' 
espacio='E1' tipo='texto' fondo='no' color='20303a' dibujar-si='debug' expresión='[txt.x+100,txt.y]' texto='S.n = [S.n]' decimales='2' fijo='no' ancho='1' fuente='SansSerif,PLAIN,18' align='a_left' anchor='a_top_left' 
espacio='E1' tipo='texto' fondo='no' color='20303a' dibujar-si='debug' expresión='[txt.x+100,txt.y+30+16*s]' familia='s' s.intervalo='[0,S.n-1]' s.pasos='S.n-1' texto='[s]: ([S[s,0]],[S[s,1]])' decimales='2' fijo='no' ancho='1' fuente='Monospaced,BOLD,14' align='a_left' anchor='a_top_left' 
espacio='E1' tipo='texto' fondo='no' color='20303a' dibujar-si='debug' expresión='[txt.x+240,txt.y]' texto='RES.n([iRes]) = [RES.n[iRes]]' decimales='2' fijo='no' ancho='1' fuente='SansSerif,PLAIN,18' align='a_left' anchor='a_top_left' 
espacio='E1' tipo='texto' fondo='no' color='20303a' dibujar-si='(debug)&(iRes>=0)&(RES.getElement(iRes,s))' expresión='[txt.x+240,txt.y+30+15*s]' familia='s' s.intervalo='[0,RES.n[iRes]-1]' s.pasos='RES.n[iRes]-1' texto='([res.a],[res.b]) <= {[res.Ri],[res.Si]}' decimales='2' fijo='no' ancho='1' fuente='Monospaced,PLAIN,15' align='a_left' anchor='a_top_left' 
