Coder Social home page Coder Social logo

Comments (2)

jamesETsmith avatar jamesETsmith commented on May 28, 2024 1

Should we close this?

from netket.

jamesETsmith avatar jamesETsmith commented on May 28, 2024

@twesterhout for EdgeColorsFromList() we are assuming that two-dimensional colorlist vector is Nx3, where N is the number of edges. In colorlist[0] our three elements are the label for vertices 1 and 2 and the integer color for that edge (in that order). I realized that the ordering is someone arbitrary here, so in PR #65, when I created the python utilities to convert networkx and igraph graphs into netket::Graphs this is taken care of automatically so users don't have to remember the order.

As for the EdgeColorsFromAdj() function we are assuming that the adjacency list is built and stored

    // If edge colors are specificied read them in, otherwise set them all to
    // 0
    if (FieldExists(pars, "EdgeColors")) {
      std::vector<std::vector<int>> colorlist =
          FieldVal<std::vector<std::vector<int>>>(pars, "EdgeColors", "Graph");
      EdgeColorsFromList(colorlist, eclist_);
    } else {
      InfoMessage() << "No colors specified, edge colors set to 0 "
                    << std::endl;
      EdgeColorsFromAdj(adjlist_, eclist_);
    }

Since it looks like you are going to get rid of the storing the adjacency list (or only storing it temporarily) in #85 we may want to do this a different way.

After both functions are complete the graph member varialbe eclist_ should be populated.

from netket.

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.