Coder Social home page Coder Social logo

Comments (4)

jpfairbanks avatar jpfairbanks commented on August 15, 2024

What is the source of 2^128 nodes? you don't actually have more than 2^64 nodes right? Another solution to this problem I have seen before is to map names (arbitrarily large strings) to int64 and then use the int64 to index the graph. A Dict{T, Int} is appropriate for this. Then you can have graphs indexed by strings as well as by int128 or int32.

from lightgraphs.jl.

sbromberger avatar sbromberger commented on August 15, 2024

IPv6 addresses are 128 bits long. It would be convenient to be able to do graph analysis of v6 network traffic without having a translation dict.

Also, for IPv4, I only need 32 bits. It might be more performant to be able to create a graph with smaller-sized ints.

from lightgraphs.jl.

jpfairbanks avatar jpfairbanks commented on August 15, 2024
type Graph
    vertices::UnitRange{Int}
    edges::Set{Edge}
    fadjlist::Vector{Vector{Int}} # [src]: (dst, dst, dst)
    badjlist::Vector{Vector{Int}} # [dst]: (src, src, src)
end

fadjlist and badjlist need to be sparse representations indexed by T if you want to do that. It is a good idea because then when one goes to distribute these graphs across memory spaces that is easier. The biggest graph processing systems use such techniques. Translation from the big space to a small space will be happening somewhere, either before the data gets into the graph or inside the graph.

from lightgraphs.jl.

sbromberger avatar sbromberger commented on August 15, 2024

mmm. Yup. I forgot about fadjlist and badjlist appending. The problem is that performance is really bad with sparse matrices (and Dicts) right now, so this will likely have to wait until the situation improves a bit.

Closing out due to inviability but can continue discussion for future implementation if you'd like. Thanks for the input!

from lightgraphs.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.