True if frame is root or one of its descendants.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ReferenceFrame), | intent(in), | target | :: | root |
the subtree's root; the frame looked for |
|
| class(ReferenceFrame), | intent(in), | target | :: | frame |
the subtree's root; the frame looked for |
recursive logical function is_descendant(root, frame) result(yes) class(ReferenceFrame), intent(in), target :: root, frame !! the subtree's root; the frame looked for integer :: k yes = same_frame(root, frame) do k = 1, root%n_children if (yes) return yes = is_descendant(root%children(k)%p, frame) end do end function is_descendant