GithubHelp home page GithubHelp logo

cmdawson / percolation Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 327 KB

Calculation of percolation thresholds for 2d lattices. Makes use of the boost::graph library.

C++ 73.03% C 7.62% JavaScript 19.34%

percolation's Introduction

percolation

This branch refactors the original honeycomb lattice to (hopefully) facilitate extensions to more general lattices.

All such lattices now derive from an abstract base class called Lattice which contains all the logic necessary to determine if a long-range connected component exists. General lattices that derive from this are responsible for two things:

  1. Constructing the lattice
  2. Implementing percolate(const double& p, const double& q)

Constructing the lattice naturally involves adding vertices and edges, but must also label extremities that a long-range connected component must include. For this the VertexT includes a field 'traverse' which can be either START, MIDDLE, or END. The is_crossable routine essentially tries to traverse from a START vertex to an END one.

The ostream<<operator produces a json description of the graph vertex coordinates that may be loaded using a WebGL viewer based on the excellent babylonjs framework. See the webgl subfolder, Note as usual if you're running this from a local filesystem you'll need to allow cross-origin requests, e.g google-chrome -–allow-file-access-from-files.

For background on such thresholds see for example here and see quant-ph/0605014 for their significance in quantum computing.

percolation's People

Contributors

cmdawson avatar

Stargazers

Steve Flammia avatar

Watchers

James Cloos avatar  avatar

Forkers

hussainzaidi

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.