]> git.donarmstrong.com Git - mothur.git/blob - fullmatrix.h
fixed valid parameters to include shared parameter for read.shared command.
[mothur.git] / fullmatrix.h
1 #ifndef FULLMATRIX_H
2 #define FULLMATRIX_H
3 /*
4  *  fullmatrix.h
5  *  Mothur
6  *
7  *  Created by Sarah Westcott on 3/6/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 #include "mothur.h"
13 #include "groupmap.h"
14 #include "globaldata.hpp"
15 #include "progress.hpp"
16
17 using namespace std;
18
19 class FullMatrix {
20         
21         public:
22                 FullMatrix(){};
23                 FullMatrix(ifstream&);
24                 ~FullMatrix(){};
25         
26                 int getNumSeqs();
27                 void printMatrix(ostream&);
28         
29         private:
30                 void sortGroups();  //this function sorts the sequences within the matrix.
31                 void quicksort(int, int, int);//row of matrix, low, high and row number
32                 void readSquareMatrix(ifstream&);  
33                 void readLTMatrix(ifstream&);
34                 vector< vector<float> > matrix;  //a 2D distance matrix of all the sequences and their distances to eachother.
35                 map<int, string> index; // row in vector, sequence group.  need to know this so when we sort it can be updated.
36                 GroupMap* groupmap;  //maps sequences to groups they belong to.
37                 GlobalData* globaldata;
38                 int numSeqs;
39                 bool square;
40
41 };
42
43 #endif