}
}
catch(exception& e) {
- errorOut(e, "RAbundVector", "RAbundVector");
+ m->errorOut(e, "RAbundVector", "RAbundVector");
exit(1);
}
}
data = rav;
}
catch(exception& e) {
- errorOut(e, "RAbundVector", "RAbundVector");
+ m->errorOut(e, "RAbundVector", "RAbundVector");
exit(1);
}
}
}
}
catch(exception& e) {
- errorOut(e, "RAbundVector", "RAbundVector");
+ m->errorOut(e, "RAbundVector", "RAbundVector");
exit(1);
}
}
numSeqs += (newBinSize - oldBinSize);
}
catch(exception& e) {
- errorOut(e, "RAbundVector", "set");
+ m->errorOut(e, "RAbundVector", "set");
exit(1);
}
}
return data[index];
}
+/***********************************************************************/
+void RAbundVector::clear(){
+ numBins = 0;
+ maxRank = 0;
+ numSeqs = 0;
+ data.clear();
+
+}
/***********************************************************************/
void RAbundVector::push_back(int binSize){
numSeqs += binSize;
}
catch(exception& e) {
- errorOut(e, "RAbundVector", "push_back");
+ m->errorOut(e, "RAbundVector", "push_back");
exit(1);
}
}
return data.rend();
}
+/***********************************************************************/
+void RAbundVector::nonSortedPrint(ostream& output){
+ try {
+ output << label << '\t' << numBins << '\t';
+
+ for(int i=0;i<numBins;i++){ output << data[i] << '\t'; }
+ output << endl;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "RAbundVector", "nonSortedPrint");
+ exit(1);
+ }
+}
/***********************************************************************/
void RAbundVector::print(string prefix, ostream& output){
try {
output << endl;
}
catch(exception& e) {
- errorOut(e, "RAbundVector", "print");
+ m->errorOut(e, "RAbundVector", "print");
exit(1);
}
}
+
/***********************************************************************/
void RAbundVector::print(ostream& output){
try {
output << endl;
}
catch(exception& e) {
- errorOut(e, "RAbundVector", "print");
+ m->errorOut(e, "RAbundVector", "print");
exit(1);
}
}
return sav;
}
catch(exception& e) {
- errorOut(e, "RAbundVector", "getSAbundVector");
+ m->errorOut(e, "RAbundVector", "getSAbundVector");
exit(1);
}
}
OrderVector RAbundVector::getOrderVector(map<string,int>* nameMap = NULL) {
try {
OrderVector ov;
-
+
for(int i=0;i<data.size();i++){
for(int j=0;j<data[i];j++){
ov.push_back(i);
}
}
random_shuffle(ov.begin(), ov.end());
-
ov.setLabel(label);
+ ov.getNumBins();
+
return ov;
}
catch(exception& e) {
- errorOut(e, "RAbundVector", "getOrderVector");
+ m->errorOut(e, "RAbundVector", "getOrderVector");
exit(1);
}
}