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
We assume that we know (either through user input or explicitly represented model structure) what flows should go east and south (and even north and west if we want to be able to go back and forth along chains through things like immunity waning and vaccination).
We also assume that we have a topological sort, and if necessary for non-DAGs a way to declare the first state in the sort.
We then have a recursive function f(i, list(x, y), list(N, S, E, W), visited) that updates (x, y) where.
i : an index representing one state
x, y : vectors giving the x and y coordinates of each state (this is the 'layout')
N, S, E, W : lists, each element of which gives states to the north, south, east, and west of a focal state
visited : vector containing indices of states that have been visited, with this vector growing as the recursion traverses the graph
The text was updated successfully, but these errors were encountered:
We assume that we know (either through user input or explicitly represented model structure) what flows should go east and south (and even north and west if we want to be able to go back and forth along chains through things like immunity waning and vaccination).
We also assume that we have a topological sort, and if necessary for non-DAGs a way to declare the first state in the sort.
We then have a recursive function
f(i, list(x, y), list(N, S, E, W), visited)
that updates(x, y)
where.i
: an index representing one statex
,y
: vectors giving the x and y coordinates of each state (this is the 'layout')N
,S
,E
,W
: lists, each element of which gives states to the north, south, east, and west of a focal statevisited
: vector containing indices of states that have been visited, with this vector growing as the recursion traverses the graphThe text was updated successfully, but these errors were encountered: