0001 function [ext_index,ext_table] = ...
0002 vb_asign_neighbor_vertex(base_index,nextIX,nextDD)
0003
0004
0005
0006
0007
0008
0009 Nbase = length(base_index);
0010 Nall = size(nextDD,1);
0011
0012 base_flag = zeros(Nall,1);
0013 base_flag(base_index) = 1;
0014
0015 ext_index = vb_setdiff2([1:Nall], base_index);
0016 Next = length(ext_index);
0017 ext_table = cell(Next,1);
0018
0019 for i=1:Next
0020 ix = ext_index(i);
0021
0022
0023 inext = nextIX{ix};
0024
0025 nextdd = nextDD{ix};
0026
0027
0028 jnext = find(base_flag(inext) > 0 );
0029
0030 jdd = nextdd(jnext);
0031 [dmin,jj] = min(jdd);
0032
0033
0034 jmin = jnext(jj);
0035 ext_table{i} = inext(jmin);
0036 end