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
The insert_cohort subroutine flips the order of cohorts (given identical heights), while sort_cohorts preserves order.
Essentially, this means that if we give insert_cohort a list of cohorts 1...100 (all the same exact height), the resulting list will be ordered 100...1.
current => pshortest
exitloop = 0
!starting with shortest tree on the grid, find tree just
!taller than tree being considered and return its pointer
if (associated(current)) then
do while (associated(current).and.exitloop == 0)
**if (current%height < tsp) then**
current => current%taller
else
exitloop = 1
endif
enddo
endif
if we switch this to if (current%height <= tsp) then we will preserve order.
I think this is not ideal, and is somewhat confusing. I would like to propose we make this change this so that insert_cohort preserves the order.
I have a branch that updates our insert_cohort and sort_cohort routines. Because of this change, it is not B4B. I also propose adding some checks to make sure we don't have any inadvertently disconnected cohorts.
The text was updated successfully, but these errors were encountered:
The
insert_cohort
subroutine flips the order of cohorts (given identical heights), whilesort_cohorts
preserves order.Essentially, this means that if we give
insert_cohort
a list of cohorts 1...100 (all the same exact height), the resulting list will be ordered 100...1.This is because of this line:
if we switch this to if (current%height <= tsp) then we will preserve order.
I think this is not ideal, and is somewhat confusing. I would like to propose we make this change this so that
insert_cohort
preserves the order.I have a branch that updates our
insert_cohort
andsort_cohort
routines. Because of this change, it is not B4B. I also propose adding some checks to make sure we don't have any inadvertently disconnected cohorts.The text was updated successfully, but these errors were encountered: