File: distancedb.hpp

package info (click to toggle)
mothur 1.48.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 13,684 kB
  • sloc: cpp: 161,854; makefile: 122; sh: 31
file content (40 lines) | stat: -rwxr-xr-x 749 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef DISTANCEDB_HPP
#define DISTANCEDB_HPP

/*
 *  distancedb.hpp
 *  
 *
 *  Created by westcott on 1/27/10.
 *  Copyright 2010 Schloss Lab. All rights reserved.
 *
 */


#include "mothur.h"
#include "calculator.h"

class DistanceDB : public SearchDatabase {
	
public:
	
	DistanceDB();
	~DistanceDB() { delete distCalculator; }
	
	void generateDB(){}; //doesn't generate a search db 
	void addSequence(Sequence); 
	string getName(int i) { return data[i].getName(); } 
	vector<int> findClosestSequences(Sequence*, int, vector<float>&) const;  // returns indexes of n closest sequences to query
	
private:
	vector<Sequence> data;
	DistCalc* distCalculator;
	
	int templateSeqsLength;
	bool templateAligned;
	
	bool isAligned(string);
	
};

#endif