Description Usage Arguments Details Value Examples
View source: R/further_functions.R
Compared two loop lists and returns the indices of those loops that are identical in both lists, that switch only the sign or that do not occur in both lists
1 | compare_loop_list(loop_list_a, loop_list_b)
|
loop_list_a, loop_list_b |
Loop lists with columns |
Indices of loops are given with respect to the order of the
loops in the first supplied loop list as well as for the second loop
list. The loops are sorted to represent their loops starting from the
smallest variable index (using the function sort_loop_index
).
A list with 5 (possible empty) vectors as entries.
ind_a_id
- indices of the loops in the first loop list that occur
identically in the second loop list
ind_a_switch
- indices of the loops in the first loop list that occur
in the second loop list with a different sign
ind_a_notin
- indices of the loops in the first loop list that do not
occur in the second loop list
ind_b_id
- indices of loops in the second loop list corresponding to
the loops reported in ind_a_id
ind_b_switch
- indices of loops in the second loop list corresponding
to loops reported in ind_a_switch
.
1 2 3 4 5 6 7 8 9 10 11 12 | #sample Jacobian matrix of a system with 4 variables
jac_matrix <- rbind(c(-1,0,0,-1),c(1,-1,0,1),c(0,1,-1,0),c(0,0,1,-1))
#find the feedback loops of the system
loop_list <- find_loops(jac_matrix,10)
#a slightly different Jacobian matrix of the system with 4 variables
jac_matrix_alt <- rbind(c(-1,0,0,1),c(1,-1,0,-1),c(0,1,-1,0),c(0,0,1,-1))
#find the feedback loops of the system
loop_list_alt <- find_loops(jac_matrix_alt,10)
#compare the loop lists
comp_loop_list <- compare_loop_list(loop_list,loop_list_alt)
#loops that switch sign
comp_loop_list[['ind_a_switch']]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.