jfb-h / mainpaths.jl Goto Github PK
View Code? Open in Web Editor NEWA julia package for main path analysis.
License: MIT License
A julia package for main path analysis.
License: MIT License
BackwardLocal
traversal is currently prohibitively slow. It is instead faster to reverse the graph, permute the matrix with edgeweights then run ForwardLocal
and in the end reverse the resulting main path instead.
Hello, how are you, glad you started the implementation of main path analysis. I would like to know if it is possible to carry out the implementation of the SPLC algorithm. I totally can help you out with you guide me :D
Add a Base.union
method for MainPathResult
, like so:
function project_edges(mp)
vs = mp.vertices
es = map(edges(mp.mainpath)) do e
Edge(vs[src(e)], vs[dst(e)])
end
end
function Base.union(mp1::MainPaths.MainPathResult, mp2::MainPaths.MainPathResult)
es = mapreduce(project_edges, vcat, [mp1, mp2])
g = SimpleDiGraph(es)
g, i = induced_subgraph(g, findall(>(0), degree(g)))
s = vcat(mp1.vertices[mp1.start], mp2.vertices[mp2.start])
s = [findfirst(==(si), i) for si in s]
MainPaths.MainPathResult(g, i, s)
end
As can be noted SPLCEdge must be a subtype MainPathEdgeWeight, right?
Base.@kwdef struct SPLCEdge <: MainPathVertexWeight
MainPaths.jl/src/weights_spc.jl
Line 164 in 613dcf1
Considering this link: SPLC where the example show six path traverse through the link (D, F) thus give it the SPLC value 6. They are: B-D-F-H-K, B-D-F-I-L, B-D-F-I-M-N, D-F-H-K, D-F-I-L, and D-F-I-M-N.
My question is: It is possible to output this path nowadays in your source-code?
Thanks a lot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.