    001    package calhoun.analysis.crf.features.supporting.phylogenetic;
    002
    003    import java.io.Serializable;
    004
    005    public class BinaryTreeNode implements Serializable{
    006
    007            /**
    008             *
    009             */
    010            private static final long serialVersionUID = -2109391655262800568L;
    011            public  int    p;   // parent;
    012            public  int    l;   // left child
    013            public  int    r;   // right child
    014            public  double d;   // branch distance
    015            public  String n;   // name of node
    016            public  Boolean   lm;  // left mark
    017            public  Boolean   rm;  // right mark
    018
    019
    020            BinaryTreeNode() {
    021                    p  = -1;
    022                    l  = -1;
    023                    r  = -1;
    024                    d  = 0.0;
    025                    n  = "";
    026                    lm = false;
    027                    rm = false;
    028            }
    029
    030
    031            BinaryTreeNode(int parent, int left, int right, double dist, String name) {
    032                    p  = parent;
    033                    l  = left;
    034                    r  = right;
    035                    d  = dist;
    036                    n  = name;
    037                    lm = false;
    038                    rm = false;
    039            }
    040
    041            @Override
    042            public String toString() {
    043                    String ret = "parent: " + p + "  left: " + l + "  right: " + r + "  distance: " + d + "  name: " + n;
    044                    return ret;
    045            }
    046
    047
    048
    049    }