function nodes = RD_cells2nodes(cx,cy,cd,a,b_range)
%

[num_side,dummy] = size(a);
num_nodes = 0;

for r = 1:num_side
    for c = 1:num_side
        num_nodes = num_nodes + 1;
        nodes(num_nodes).x = cx(r,c);
        nodes(num_nodes).y = cy(r,c);
        nodes(num_nodes).nei = find(cd(num_nodes,:)<b_range);
        nodes(num_nodes).a = a(r,c);
    end
end
