]> git.donarmstrong.com Git - mothur.git/blob - readmatrix.hpp
added sparseDistanceMatrix class. Modified cluster commands to use the new sparse...
[mothur.git] / readmatrix.hpp
1 #ifndef READMATRIX_HPP
2 #define READMATRIX_HPP
3
4 /*
5  *  readmatrix.hpp
6  *  
7  *
8  *  Created by Pat Schloss on 8/13/08.
9  *  Copyright 2008 Patrick D. Schloss. All rights reserved.
10  *
11  */
12
13 #include "mothur.h"
14 #include "listvector.hpp"
15 #include "nameassignment.hpp"
16 #include "sparsedistancematrix.h"
17
18 class SparseMatrix;
19
20 class ReadMatrix {
21
22 public:
23         ReadMatrix(){ DMatrix = new SparseDistanceMatrix(); m = MothurOut::getInstance();  }
24         virtual ~ReadMatrix() {}
25         virtual int read(NameAssignment*){ return 1; }
26         
27         void setCutoff(float c)                 {       cutoff = c;             }
28     SparseDistanceMatrix* getDMatrix()          {       return DMatrix;         }
29         ListVector* getListVector()             {       return list;    }
30
31         int successOpen;
32         
33 protected:
34     SparseDistanceMatrix* DMatrix;
35         ListVector* list;
36         float cutoff;
37         MothurOut* m;
38         bool sim;
39 };
40
41
42
43 #endif