YangLab-um / BiologicalOscillations.jl

A package for researchers working with biological oscillations
https://yanglab-um.github.io/BiologicalOscillations.jl/
MIT License
1 stars 2 forks source link

Add function to find all cycles and their types in any networks #29

Closed biphy closed 9 months ago

biphy commented 9 months ago

This reopens PR #25 solving merge conflicts. The new function finds all cycles from a given connectivity matrix. The following is an example for a Goodwin oscillator with an additional positive feedback self-loop:

> find_all_cycles_and_types([1 0 1; 1 0 0; 0 -1 0])
(Any[[1], [1, 2, 3]], Any["positive", "negative"])

In the current implementation, the detected cycles are sorted in an ascending order by their lengths. The tests for the removed function calculate_loop_length_and_type is rewritten using the new function.