5 * Created by Pat Schloss on 7/8/11.
6 * Copyright 2011 Patrick D. Schloss. All rights reserved.
10 /**************************************************************************************************/
12 #include "taxonomynode.h"
14 /**************************************************************************************************/
16 TaxonomyNode::TaxonomyNode(string n, int l): name(n), level(l){
17 m = MothurOut::getInstance();
23 /**************************************************************************************************/
25 void TaxonomyNode::setName(string n) { name = n; }
27 /**************************************************************************************************/
29 string TaxonomyNode::getName() { return name; }
31 /**************************************************************************************************/
33 void TaxonomyNode::setParent(int p) { parent = p; }
35 /**************************************************************************************************/
37 int TaxonomyNode::getParent() { return parent; }
39 /**************************************************************************************************/
41 void TaxonomyNode::makeChild(string c, int i) { children[c] = i; }
44 /**************************************************************************************************/
46 map<string, int> TaxonomyNode::getChildren() { return children; }
48 /**************************************************************************************************/
50 int TaxonomyNode::getChildIndex(string c){
51 map<string, int>::iterator it = children.find(c);
52 if(it != children.end()) { return it->second; }
56 /**************************************************************************************************/
58 int TaxonomyNode::getNumKids() { return (int)children.size(); }
60 /**************************************************************************************************/
62 int TaxonomyNode::getNumSeqs() { return numSeqs; }
64 /**************************************************************************************************/
66 void TaxonomyNode::setTotalSeqs(int n) { totalSeqs = n; }
68 /**************************************************************************************************/
70 int TaxonomyNode::getLevel() { return level; }
72 /**************************************************************************************************/