File: taxonomynode.cpp

package info (click to toggle)
mothur 1.48.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,684 kB
  • sloc: cpp: 161,854; makefile: 122; sh: 31
file content (29 lines) | stat: -rwxr-xr-x 896 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 *  taxonomynode.cpp
 *  
 *
 *  Created by Pat Schloss on 7/8/11.
 *  Copyright 2011 Patrick D. Schloss. All rights reserved.
 *
 */

/**************************************************************************************************/

#include "taxonomynode.h"

/**************************************************************************************************/

TaxonomyNode::TaxonomyNode(string n, int l): name(n), level(l){
    m = MothurOut::getInstance();
	parent = -1;
	numChildren = 0;
	numSeqs = 0;
}
/**************************************************************************************************/

int TaxonomyNode::getChildIndex(string c){
	map<string, int>::iterator it = children.find(c);
	if(it != children.end())	{	return it->second;			}
	else						{	return -1;					}	
}
/**************************************************************************************************/