Beispiel #1
0
 def partition_without_matches(self):
     if not hasattr(self, "_partitions"):
         self.retrieve_partitions()
     tree = intervaltree_from_slices(self._partitions)
     for match in self.matches:
         tree.chop(match.addr, match.addr + match.size)
     return tree
Beispiel #2
0
    def partition(self):
        """
        Partitions binanry to find regions that are suitable for functions
        """

        if not hasattr(self, "_partitions"):
            self.retrieve_partitions()
        tree = intervaltree_from_slices(self._partitions)
        self._validator = tree.overlaps
        return self._partitions