]> git.donarmstrong.com Git - mothur.git/blobdiff - sabundvector.cpp
chimeras, fix to sabundvector and sharedsabundvector that caused getRabundVector...
[mothur.git] / sabundvector.cpp
index b70c642643cfd746e63c236e328feb8e37d74a44..2bb8d69a02614a9ad386062f05f9eda7673bbfa2 100644 (file)
@@ -60,8 +60,10 @@ SAbundVector::SAbundVector(ifstream& f): DataVector(), maxRank(0), numBins(0), n
        
                for(int i=1;i<=hold;i++){
                        f >> inputData;
+
                        set(i, inputData);
                }
+
        }
        catch(exception& e) {
                errorOut(e, "SAbundVector", "SAbundVector");
@@ -192,13 +194,13 @@ RAbundVector SAbundVector::getRAbundVector(){
        try {
                RAbundVector rav;
        
-               for(int i=1;i<=data.size();i++){                
+               for(int i=1;i < data.size();i++){
                        for(int j=0;j<data[i];j++){
                                rav.push_back(i);
                        }
                }
                sort(rav.rbegin(), rav.rend());
-       
+
                rav.setLabel(label);
                return rav;
        }