-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheseqclusteravg.h
71 lines (49 loc) · 1.64 KB
/
eseqclusteravg.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef ESEQCLUSTERAVG_H
#define ESEQCLUSTERAVG_H
#include <eutils/evar.h>
#include <eutils/estr.h>
#include <eutils/efile.h>
#include <eutils/eblockarray.h>
#include <eutils/ebasicarray.h>
#include "eseqcluster.h"
#include "eseqclustercount.h"
#include <set>
#undef check
typedef ebasichashmap<eseqdistCount,eseqdistCount,hash_lookup3_eseqdistCount> eseqdistavghash;
class eseqclusteravg
{
public:
INDTYPE mergecount;
INDTYPE cf;
float thres;
int seqlen;
estrarray *seqarr;
float (*fdist)(const estr&,const estr&,int);
efile ofile;
eseqdistavghash::iter incmaxit;
float incmaxdist;
float lastdist;
ebasicarray<INDTYPE> scount;
ebasicarray<INDTYPE> scluster;
ebasicarray<INDTYPE> smerge;
eseqdistavghash smatrix;
ebasicarray<list<INDTYPE> > inter;
ebasicarray<list<INDTYPE> > incluster;
eseqclusterData clusterData;
multiset<eseqdistCount,greater<eseqdistCount> > completemerges;
void check(ebasicarray<eseqdistCount>& dists);
eseqclusteravg();
void init(INDTYPE count,const estr& ofile,const estr& seqsfile,const earray<ebasicarray<INDTYPE> >& dupslist,float thres,float (fdist)(const estr&,const estr&,int),estrarray& arr,int seqlen);
void finalize();
void merge(const eseqdistCount& dist);
void add(const eseqdist& sdist);
void add(const eseqdistCount& sdist);
// void add(int ind);
long update(eblockarray<eseqdistCount>& dists,long s);
// float getIncompleteMaxDist(float newdist);
void getIncompleteMaxDist(float newdist,float &maxdist,eseqdistavghash::iter& maxit);
void mergeComplete(float dist);
void clearComplete();
void save(const estr& filename,const estrarray& arr);
};
#endif