📄 routing_state_bvr.m
字号:
function states =routing_state_bvr(res,neighborhop)if nargin<2 neighborhop=1;endUSE_BYTE_OR_N_ENTRY = 1; %=1: use byte, =0: use number of entriesn_beacon = length( res.beacons );NEXT_HOP_COST = 2; % 2 bytes to store a nexthop entryBYTE_PER_BEACON = 2+1+1+NEXT_HOP_COST;BYTE_PER_COORD_ENTRY = n_beacon + 8;if neighborhop==2 if USE_BYTE_OR_N_ENTRY states = res.state_per_node_bvr_2h*BYTE_PER_COORD_ENTRY ... + repmat(n_beacon*(BYTE_PER_BEACON), ... length(res.cluster_cr),1); else states = res.state_per_node_bvr_2h; endelse if USE_BYTE_OR_N_ENTRY states = res.state_per_node_bvr_sf*BYTE_PER_COORD_ENTRY ... + repmat(n_beacon*(BYTE_PER_BEACON), ... length(res.cluster_cr),1); else states = res.state_per_node_bvr_sf; end end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -