代码搜索:PATH
找到约 10,000 项符合「PATH」的源代码
代码结果 10,000
www.eeworm.com/read/201643/15400342
m mutationreverse.m
function path=MutationReverse(path,Pm)
[row,col]=size(path);
childpath=path;
for i=1:row
point=randperm(col)-1;
point1=min(point(1),point(2));
point2=max(point(1),point(2));
tem
www.eeworm.com/read/201643/15400352
m fitness.m
function FP=Fitness(path,TSPMatrix)
[row,col]=size(path);
for i=1:row
pathlong(i)=0;
for j=1:(col-1)
pathlong(i)=pathlong(i)+TSPMatrix(path(i,j),path(i,j+1));
end
pathlo
www.eeworm.com/read/201642/15400355
asv select.asv
function path=Select(path,FP)
%轮盘赌选择
[row,col]=size(path);
roulette=cumsum(FP);
for i=1:row
tempP=rand(1);
for j=1:length(roulette)
if tempP
www.eeworm.com/read/201642/15400360
m pathlong.m
function pathlong=pathlong(path,TSPMatrix)
%计算路径长度
[row,col]=size(path);
for i=1:row
pathlong(i)=0;
for j=1:(col-1)
pathlong(i)=pathlong(i)+TSPMatrix(path(i,j),path(i,j+1));
www.eeworm.com/read/201642/15400363
m select.m
function path=Select(path,FP)
%轮盘赌选择
[row,col]=size(path);
roulette=cumsum(FP);
for i=1:row
tempP=rand(1);
for j=1:length(roulette)
if tempP
www.eeworm.com/read/201642/15400364
m mutationreverse.m
function path=MutationReverse(path,Pm)
%逆转变异
[row,col]=size(path);
childpath=path;
for i=1:row
point=randperm(col)-1;
point1=min(point(1),point(2));
point2=max(point(1),point(2));
www.eeworm.com/read/201642/15400373
asv fitness.asv
function FP=Fitness(path,TSPMatrix)
%计算适应度
[row,col]=size(path);
for i=1:row
pathlong(i)=0;
for j=1:(col-1)
pathlong(i)=pathlong(i)+TSPMatrix(path(i,j),path(i,j+1));
end
www.eeworm.com/read/201642/15400374
m fitness.m
function FP=Fitness(path,TSPMatrix)
%计算适应度
[row,col]=size(path);
for i=1:row
pathlong(i)=0;
for j=1:(col-1)
pathlong(i)=pathlong(i)+TSPMatrix(path(i,j),path(i,j+1));
end
www.eeworm.com/read/201477/15407439
cpp gpath.cpp
// find a path in an undirected graph
#include
#include "ag.h"
void main(void)
{
AdjacencyGraph G(7);
int path[7];
cout
www.eeworm.com/read/201477/15407680
out wire.out
Enter grid size
Enter start
Enter finish
Enter wiring grid
The wire path is
42
52
53
54
64
65
66
56
46