📄 found1.m
字号:
function found(s,p0)global path_energy;global n;global neighbour;global p;global c;global parent_reliability;global parent_hops;global parent_constraint;global link_energy;global constraint_energy;global flag;if path_energy(s)>p0 parent_constraint(s)=parent_energy(s); constraint_energy(s)=constraint_energy(parent_energy(s))+link_energy(s,parent_energy(s));else if c(s)<p0 parent_constraint(s)=s; constraint_energy(s)=100; else for i=1:n(s)-1 j=1; k=neighbour(s,i); if p(s,k)*c(k)>p0 found(k,p0/p(s,k)); constraint_energy(s)=constraint_energy(k)+link_energy(s,k); if constraint_energy(s)<temp constraint_energy(s)=temp; parent_constraint(s)=k; end end end endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -