X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedlistvector.cpp;fp=sharedlistvector.cpp;h=49780314bca4d40be6a96a9593831b39317faaca;hb=260ae19c36cb11a53ddc5a75b5e507f8dd8b31d6;hp=cc3cd8df4205e2f37182a8a80037bc02bb37ca45;hpb=d84bb41d7dadcfa2c67ce5edb9b94060e5659fa7;p=mothur.git diff --git a/sharedlistvector.cpp b/sharedlistvector.cpp index cc3cd8d..4978031 100644 --- a/sharedlistvector.cpp +++ b/sharedlistvector.cpp @@ -52,9 +52,9 @@ SharedListVector::SharedListVector(ifstream& f) : DataVector(), maxRank(0), numB /***********************************************************************/ void SharedListVector::set(int binNumber, string seqNames){ try { - int nNames_old = getNumNames(data[binNumber]); + int nNames_old = m->getNumNames(data[binNumber]); data[binNumber] = seqNames; - int nNames_new = getNumNames(seqNames); + int nNames_new = m->getNumNames(seqNames); if(nNames_old == 0) { numBins++; } if(nNames_new == 0) { numBins--; } @@ -79,7 +79,7 @@ string SharedListVector::get(int index){ void SharedListVector::push_back(string seqNames){ try { data.push_back(seqNames); - int nNames = getNumNames(seqNames); + int nNames = m->getNumNames(seqNames); numBins++; @@ -141,7 +141,7 @@ RAbundVector SharedListVector::getRAbundVector(){ RAbundVector rav; for(int i=0;igetNumNames(data[i]); rav.push_back(binSize); } @@ -171,7 +171,7 @@ SAbundVector SharedListVector::getSAbundVector(){ SAbundVector sav(maxRank+1); for(int i=0;igetNumNames(data[i]); sav.set(binSize, sav.get(binSize) + 1); } sav.set(0, 0); @@ -194,7 +194,7 @@ SharedOrderVector* SharedListVector::getSharedOrderVector(){ order->setLabel(label); for(int i=0;igetNumNames(get(i)); //find number of individual in given bin names = get(i); while (names.find_first_of(',') != -1) { name = names.substr(0,names.find_first_of(',')); @@ -275,7 +275,7 @@ vector SharedListVector::getSharedRAbundVector() { finder[globaldata->gGroupmap->namesOfGroups[i]] = temp; finder[globaldata->gGroupmap->namesOfGroups[i]]->setLabel(label); finder[globaldata->gGroupmap->namesOfGroups[i]]->setGroup(globaldata->gGroupmap->namesOfGroups[i]); - if (inVector(globaldata->gGroupmap->namesOfGroups[i], globaldata->Groups)) { //if this group is in user groups + if (m->inUsersGroups(globaldata->gGroupmap->namesOfGroups[i], globaldata->Groups)) { //if this group is in user groups lookup.push_back(finder[globaldata->gGroupmap->namesOfGroups[i]]); } } @@ -331,7 +331,7 @@ OrderVector SharedListVector::getOrderVector(map* orderMap = NULL){ OrderVector ov; for(int i=0;igetNumNames(data[i]); for(int j=0;j