-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Given a large corpus of computer programs, create a graph / hypergraph where functions are linked if they are called within the same function.
e.g.
function nngraph(idxs::Matrix{Int32})
n = size(idxs, 2)
ei = zeros(Int,0)
ej = copy(ei)
for i=1:n
for k=1:size(idxs,1)
push!(ei, i)
push!(ej, idxs[k,i])
end
end
A = sparse(ei,ej,1.0,n,n)
return max.(A,A')
end
This would create edges / hyperedges among
size, zeros, copy, push!, sparse, max.
An ideal corpus would be the set of Julia packages...
Metadata
Metadata
Assignees
Labels
No labels