Package org.forester.development
Class DevelopmentTools
- java.lang.Object
-
- org.forester.development.DevelopmentTools
-
public final class DevelopmentTools extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Phylogeny
createBalancedPhylogeny(int levels, int children_per_node)
Creates a completely balanced rooted phylogeny with a given number of levels and children per node.static void
intervalNumberSpecies(Phylogeny t, int i)
Sets the species name of the external Nodes of Phylogeny t to 1, 1+i, 2, 2+i, 3, 3+i, ....static void
numberSpeciesInDescOrder(Phylogeny t)
Sets the species namea of the external Nodes of Phylogeny t to descending integers, ending with 1.static void
numberSpeciesInOrder(Phylogeny t)
Sets the species namea of the external Nodes of Phylogeny t to ascending integers, starting with 1.static void
randomizeSpecies(int min, int max, Phylogeny t)
Sets the species names of the external Nodes of Phylogeny t to a random positive integer number between (and including) min and max.
-
-
-
Method Detail
-
createBalancedPhylogeny
public static Phylogeny createBalancedPhylogeny(int levels, int children_per_node)
Creates a completely balanced rooted phylogeny with a given number of levels and children per node.- Parameters:
levels
-children_per_node
-- Returns:
- a completely balanced rooted phylogeny
-
intervalNumberSpecies
public static void intervalNumberSpecies(Phylogeny t, int i)
Sets the species name of the external Nodes of Phylogeny t to 1, 1+i, 2, 2+i, 3, 3+i, .... Examples: i=2: 1, 3, 2, 4 i=4: 1, 5, 2, 6, 3, 7, 4, 8 i=8: 1, 9, 2, 10, 3, 11, 4, 12, ...
-
numberSpeciesInDescOrder
public static void numberSpeciesInDescOrder(Phylogeny t)
Sets the species namea of the external Nodes of Phylogeny t to descending integers, ending with 1.
-
numberSpeciesInOrder
public static void numberSpeciesInOrder(Phylogeny t)
Sets the species namea of the external Nodes of Phylogeny t to ascending integers, starting with 1.
-
randomizeSpecies
public static void randomizeSpecies(int min, int max, Phylogeny t)
Sets the species names of the external Nodes of Phylogeny t to a random positive integer number between (and including) min and max.- Parameters:
t
- whose external species names are to be randomizedmin
- minimal value for random numbersmax
- maximum value for random numbers
-
-