( branch: BaseRoot, other: BaseRoot, s: SimulationState )
| 1809 | let isSubsuming = false |
| 1810 | |
| 1811 | const isSubsumed = ( |
| 1812 | branch: BaseRoot, |
| 1813 | other: BaseRoot, |
| 1814 | s: SimulationState |
| 1815 | ): boolean => { |
| 1816 | if (branch.is("morph") && other.is("morph") && !branch.sameMorphs(other)) |
| 1817 | return false |
| 1818 | let intersection: BaseRoot | Disjoint |
| 1819 | isSubsuming = true |
| 1820 | try { |
| 1821 | // relating them reads resolutions directly, so the intersection isn't finalized |
| 1822 | intersection = branch.rawIntersect(other) |
| 1823 | } finally { |
| 1824 | isSubsuming = false |
| 1825 | } |
| 1826 | return ( |
| 1827 | !(intersection instanceof Disjoint) && |
| 1828 | isSimulated(branch, intersection, s) && |
| 1829 | isSimulated(intersection, branch, s) |
| 1830 | ) |
| 1831 | } |
| 1832 | |
| 1833 | const isWithin = (l: BaseRoot, r: BaseRoot, s: SimulationState): boolean => |
| 1834 | l.branches.every( |
no test coverage detected