Comments (4)
Ok, I have added an example demonstrating how this might work. Forgive my handling of the Money
values, I've not used it before, so it may be less than optimal.
hash-graph/examples/Currency.hs
Lines 15 to 17 in f18b143
I've implemented a rough version of pathTree
. My only warning is that it will infinitely loop on graphs containing self loops (e.g. an edge from "USD" to "USD"). This will return a list of edges, which should not lose any information from the graph.
from hash-graph.
Wonderful! Thanks a lot for implementing this, and doing it so fast.
Would you happen to know the time complexity of your
pathTree
implementation?
from hash-graph.
Hm, so I mostly used the algorithm from Graphalyze, which recursively calls match
. I believe worst-case you are looking at something like N2E.
from hash-graph.
Great. I won't be using it for huge graphs, so I hope that won't become a problem.
I finally got the time to try out pathTree
properly. I've extended the "Currency"/exchange rate example to a total of eight edges with four possible paths of length five (along with some pretty printing). See PR #5.
from hash-graph.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hash-graph.