rusandris / StateTransitionNetworks.jl

Toolkit for dynamics on state transition networks
1 stars 0 forks source link

`calculate_transition_matrix` in-place remapping problems #22

Closed rusandris closed 3 months ago

rusandris commented 4 months ago

calculate_transition_matrix right now remaps sts in-place aka. integer symbols get replaced by an another integer from 1:length(unique(sts)) if map_symbols=true. This was introduced in 28570fa .

This is not obvious from the function name alone, it should be clearly signalled by ! convention => separate out-of-place and in-place versions of calculate_transition_matrix.

Also, there should be the possibility to specify symbol_dictionary as a parameter, which should have a default value.

calculate_transition_matrix with no remapping at all can be a separate function with a new name: calculate_transition_matrix_no_remap

rusandris commented 4 months ago

These changes are needed because 1. function names are unclear, 2. transition addition isn't possible if sts is remapped in-place

rusandris commented 3 months ago

See fix here ed33f0d

rusandris commented 3 months ago

Finally fixed after 8c712e0