blob: 59238036d48bbc622c420a42429109ee91f0d6f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//Simple Graph Functions
function[]=graph();
i=1,j=1;
adj=zeros(10000);
for i=1:n
for j=1:n
adj((i-1)*n+j)=temp;
end
end
for i=1:n
for j=1:n
if((adj((i-1)*n+j))==1)
printf("Vertex %d is connected to vertex %d\n",i,j);
end
end
end
endfunction
|