Skip to content

Preorder types #229

Description

@ms609

RenumberTips.phylo degenerates preorder into cladewise as it's possible that edges, whilst in preorder, are not in the identical order generated by Preorder.

# If the labels of a tree are modified, then it will no longer be in "strict" 
# preorder. Degenerate to "cladewise".
# TODO in a future release, we may wish to distinguish "strict" preorder
# with a relaxed version that is still "preorder" but doesn't guarantee
# identical edge matrices.
.LapsePreorder <- function (tree) {
  if (attr(tree, "order") == "preorder") {
    attr(tree, "order") <- "cladewise"
  }
  tree
}

We may therefore needlessly run reorder operations on renumbered trees.

Objective: create a suborder attributes that distinguishes trees in strict Preorder, i.e. as output by preorder_edges_and_nodes, from loose preorder, i.e. preorder from a graph theoretic perspective. use this order to determine when reordering is necessary.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions