X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=listvector.cpp;h=2758c94264a1ba527e8d7c3970e0bac53254579b;hp=9369a12280b35cd41a6a6e3548258f27ebb36b5c;hb=050a3ff02473a3d4c0980964e1a9ebe52e55d6b8;hpb=8173238f9f94af9baab8471de58bed7c8830948d diff --git a/listvector.cpp b/listvector.cpp index 9369a12..2758c94 100644 --- a/listvector.cpp +++ b/listvector.cpp @@ -13,6 +13,27 @@ #include "ordervector.hpp" #include "listvector.hpp" +//sorts highest to lowest +/***********************************************************************/ +inline bool abundNamesSort(string left, string right){ + + int countLeft = 0; + if(left != ""){ + countLeft = 1; + for(int i=0;i countRight) { + return true; + } + return false; +} /***********************************************************************/ @@ -135,9 +156,12 @@ void ListVector::print(ostream& output){ try { output << label << '\t' << numBins << '\t'; - for(int i=0;i hold = data; + sort(hold.begin(), hold.end(), abundNamesSort); + + for(int i=0;i