+ m->errorOut(e, "TreeMap", "print");
+ exit(1);
+ }
+}
+
+/************************************************************/
+void TreeMap::makeSim(vector<string> ThisnamesOfGroups) {
+ try {
+ //set names of groups
+ namesOfGroups = ThisnamesOfGroups;
+
+ //set names of seqs to names of groups
+ namesOfSeqs = ThisnamesOfGroups;
+
+ // make map where key and value are both the group name since that what the tree.shared command wants
+ for (int i = 0; i < namesOfGroups.size(); i++) {
+ treemap[namesOfGroups[i]].groupname = namesOfGroups[i];
+ seqsPerGroup[namesOfGroups[i]] = 1;
+ }
+
+ numGroups = namesOfGroups.size();
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TreeMap", "makeSim");
+ exit(1);
+ }
+}
+/************************************************************/
+void TreeMap::makeSim(ListVector* list) {
+ try {
+ //set names of groups
+ namesOfGroups.clear();
+ for(int i = 0; i < list->size(); i++) {
+ namesOfGroups.push_back(list->get(i));
+ }
+
+ //set names of seqs to names of groups
+ namesOfSeqs = namesOfGroups;
+
+ // make map where key and value are both the group name since that what the tree.shared command wants
+ for (int i = 0; i < namesOfGroups.size(); i++) {
+ treemap[namesOfGroups[i]].groupname = namesOfGroups[i];
+ seqsPerGroup[namesOfGroups[i]] = 1;
+ }
+
+ numGroups = namesOfGroups.size();
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TreeMap", "makeSim");
+ exit(1);
+ }
+}
+/************************************************************/
+int TreeMap::getCopy(TreeMap& copy){
+ try {
+
+ namesOfGroups = copy.getNamesOfGroups();
+ numGroups = copy.getNumGroups();
+ namesOfSeqs = copy.namesOfSeqs;
+ seqsPerGroup = copy.seqsPerGroup;
+ treemap = copy.treemap;
+
+ return 0;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TreeMap", "getCopy");