Code Monkey home page Code Monkey logo

Comments (2)

samblau avatar samblau commented on August 30, 2024

I know we probably want to be clever here, and I think that Daniel is working on a strategy for catching duplicate paths from kMC that would work, but after spending some time digging through paths the past couple of days, there is something pretty obvious that should work - just prune paths with identical costs. For example:

0 3.4620678646635246894
1 3.4620678646635246894
2 3.4736261363211290221
3 3.75510952395117456
4 3.7861278042505688611
5 3.7861278042505688611
6 4.2238517847547954525
7 4.3857509970409720313
8 4.3857509970409720313
9 4.477374250818638558
10 4.477374250818638558

paths 0 and 1 are duplicates, paths 4 and 5 are duplicates, paths 7 and 8 are duplicates, paths 9 and 10 are duplicates.

from mrnet.

danielbarter avatar danielbarter commented on August 30, 2024

Here is how i solve this: I have a integer index for each reaction. A pathway is then a list of indices which you can convert into a frozen set. frozen sets are hashable, so you can easily detect duplicates and count how many times each pathway happens

I think i like Sam's solution better for path finding though

from mrnet.

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.