Coder Social home page Coder Social logo

discocube / weaver Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 2.0 107.89 MB

Algorithm for solving the Hamiltonian cycle problem deterministically and in linear time on all instances of discocube graphs (tested for graphs with over 8 billion vertices). Discocube graphs are 3-dimensional grid graphs derived from: a polycube of an octahedron | a Hauy construction of an octahedron with cubes as identical building blocks...

License: GNU Affero General Public License v3.0

Rust 100.00%
rust linear-complexity np-complete-problems 3d-grid discrete-mathematics graph-algorithms graph-theory-algorithms grids hamiltonian-cycle loops

weaver's People

Contributors

discocube avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

weaver's Issues

Non trivial dependencies should be mentioned in readme

I got these two missing dependency messages when running for the first time:

  = note: ld: warning: directory not found for option '-L/opt/homebrew/opt/openblas/lib'
          ld: warning: directory not found for option '-L/opt/homebrew/opt/libomp/lib'

installing them with brew fixed it, so probably worth mentioning in the readme

Error running program

Got this at first attempt running:

 cargo run --release 1 100
    Finished release [optimized + debuginfo] target(s) in 0.17s
     Running `target/release/hamcycle 1 100`
| ๐Ÿ‡ณ    1 | โญ•๏ธ          8 | ๐Ÿ•— SOLVE: 0.0002328330 | ๐Ÿ“Œ HamCycle | ๐Ÿ•— CERTIFY: 0.0000046250
| ๐Ÿ‡ณ    2 | โญ•๏ธ         32 | ๐Ÿ•— SOLVE: 0.0000054170 | ๐Ÿ“Œ HamCycle | ๐Ÿ•— CERTIFY: 0.0000020840
| ๐Ÿ‡ณ    3 | โญ•๏ธ         80 | ๐Ÿ•— SOLVE: 0.0003580840 | ๐Ÿ“Œ HamCycle | ๐Ÿ•— CERTIFY: 0.0000078750
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/graph/defs.rs:444:52
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:64:14
   2: core::panicking::panic
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:114:5
   3: core::option::Option<T>::unwrap
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/option.rs:823:21
   4: <std::collections::hash::set::HashSet<([i16; 3],[i16; 3])> as hamcycle::graph::defs::Bridge<std::collections::hash::set::HashSet<([i16; 3],[i16; 3])>>>::bridge
             at ./src/graph/defs.rs:444:52
   5: hamcycle::graph::weave::weave::{{closure}}
             at ./src/graph/weave.rs:88:27
   6: <core::slice::iter::IterMut<T> as core::iter::traits::iterator::Iterator>::for_each
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/slice/iter/macros.rs:201:21
   7: hamcycle::graph::weave::weave
             at ./src/graph/weave.rs:86:5
   8: hamcycle::find_solutions
             at ./src/main.rs:78:20
   9: hamcycle::main
             at ./src/main.rs:66:9
  10: core::ops::function::FnOnce::call_once
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/ops/function.rs:250:5

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.