def split(self, chosen_anode): self.nsplit = self.nsplit + 1 newspenodes = [] for node in self.current_setting.spe_nodes: newspenodes.append(node) newspenodes.extend(chosen_anode.get_children()) self.current_setting = species_setting(spe_nodes = newspenodes, root = self.tree, sp_rate = 0, fix_sp_rate = False, minbr = self.min_br) self.current_logl = self.current_setting.get_log_l()
def merge(self, chosen_anode): self.nmerge = self.nmerge + 1 mnodes = chosen_anode.get_children() newspenodes = [] for node in self.current_setting.spe_nodes: if not node in mnodes: newspenodes.append(node) self.current_setting = species_setting(spe_nodes = newspenodes, root = self.tree, sp_rate = 0, fix_sp_rate = False, minbr = self.min_br) self.current_logl = self.current_setting.get_log_l()