You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many of the analysis functions require converting states from lists to integers (encoding) and back (decoding). For example, in order to compute the attractors for a network integer states must be decoded, updated and then encoded again. Python can do this; but, being python, it's slow as sin. To deal with this we have two options:
C/C++ or Cython Implementation
We could implement these core functions in something C-like. The advantage of this is that it'll be very snappy. The disadvantage is, well, C/C++. That means distributing either a binary dependency or requiring the user to have a C/C++ compiler installed.
Network.update(int)
Alternatively, we can implement update methods that operate on integer encodings directly. That is, for example, if LogicNetwork.update receives a list the function behaves as it currently does; however, if it receives an integer it updates the bits of the integer according to the update rule. This saves encoding/decoding at the expense of a more complicated implementation.
The text was updated successfully, but these errors were encountered:
@hbsmith I've been banging my head against this for a while now. I don't think there's a simple way to make this happen. Whatever we end up doing is going to take more time than we have before the next release. I propose we push this, #154 and #133 to the next release, possibly v1.1 or v1.2?
Many of the analysis functions require converting states from lists to integers (encoding) and back (decoding). For example, in order to compute the attractors for a network integer states must be decoded, updated and then encoded again. Python can do this; but, being python, it's slow as sin. To deal with this we have two options:
C/C++ or Cython Implementation
We could implement these core functions in something C-like. The advantage of this is that it'll be very snappy. The disadvantage is, well, C/C++. That means distributing either a binary dependency or requiring the user to have a C/C++ compiler installed.
Network.update(int)
Alternatively, we can implement update methods that operate on integer encodings directly. That is, for example, if
LogicNetwork.update
receives a list the function behaves as it currently does; however, if it receives an integer it updates the bits of the integer according to the update rule. This saves encoding/decoding at the expense of a more complicated implementation.The text was updated successfully, but these errors were encountered: