]> git.donarmstrong.com Git - mothur.git/blobdiff - heatmap.h
added sharedRabundFloatVector class to represent the relabund file. modified read...
[mothur.git] / heatmap.h
index 11c67eaf439ebe3adec4f40615e1380ca870e0b5..c291a4ded677b6394aa5da9819a0140cda75a8c6 100644 (file)
--- a/heatmap.h
+++ b/heatmap.h
@@ -11,6 +11,7 @@
 
 #include "rabundvector.hpp"
 #include "sharedrabundvector.h"
+#include "sharedrabundfloatvector.h"
 #include "datavector.hpp"
 #include "globaldata.hpp"
 
@@ -20,12 +21,24 @@ struct binCount {
                int abund;
                binCount(int i, int j) : bin(i), abund(j) {}
 };
+/***********************************************************************/
+struct binCountFloat {
+               int bin;
+               float abund;
+               binCountFloat(int i, float j) : bin(i), abund(j) {}
+};
+
 /***********************************************************************/
 //sorts highest abund to lowest
 inline bool comparebinCounts(binCount left, binCount right){
        return (left.abund > right.abund);      
 }
 /***********************************************************************/
+//sorts highest abund to lowest
+inline bool comparebinFloatCounts(binCountFloat left, binCountFloat right){
+       return (left.abund > right.abund);      
+}
+/***********************************************************************/
 
 class HeatMap {
        
@@ -35,9 +48,12 @@ class HeatMap {
        
                string getPic(RAbundVector*);
                string getPic(vector<SharedRAbundVector*>);
+               string getPic(vector<SharedRAbundFloatVector*>);
 
        private:
                int sortSharedVectors(vector<SharedRAbundVector*>& );
+               int sortSharedVectors(vector<SharedRAbundFloatVector*>& );
+               int sortRabund(RAbundVector*&);
                void printLegend(int, float);
 
                GlobalData* globaldata;
@@ -49,6 +65,10 @@ class HeatMap {
                map<int, int> orderTopGroup(vector<SharedRAbundVector*>&);
                map<int, int> orderTopOtu(vector<SharedRAbundVector*>&);
                map<int, int> orderShared(vector<SharedRAbundVector*>&);
+               map<int, int> orderTopGroup(vector<SharedRAbundFloatVector*>&);
+               map<int, int> orderTopOtu(vector<SharedRAbundFloatVector*>&);
+               map<int, int> orderShared(vector<SharedRAbundFloatVector*>&);
+
                        
 };