forked from jfmrod/hpc-clust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eseqcluster.h
72 lines (51 loc) · 1.3 KB
/
eseqcluster.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
71
#ifndef ESEQCLUSTER_H
#define ESEQCLUSTER_H
#include "hpc-clust-config.h"
#include <eutils/evar.h>
#include <eutils/estr.h>
#include <eutils/efile.h>
#include <eutils/ethread.h>
#include <eutils/eblockarray.h>
#include <eutils/ebasicarray.h>
#undef check
#ifdef HPC_CLUST_USE_LONGIND
#define INDTYPE long
#else
#define INDTYPE int
#endif
class eseqdist
{
public:
float dist;
// int count;
INDTYPE x;
INDTYPE y;
eseqdist();
eseqdist(INDTYPE x,INDTYPE y,float dist);
inline bool operator<(const eseqdist& sdist) const{ return(dist<sdist.dist); }
void serial(estr& data) const;
int unserial(const estr& data,int i);
};
#include "eseqclusterdata.h"
class eseqcluster
{
public:
efile ofile;
INDTYPE mergecount;
// emutex mutexDists;
// eblockarray<eseqdist> dists;
eseqclusterData clusterData;
eintarray scount;
eintarray scluster;
eintarray smerge;
ebasicstrhashof<INDTYPE> smatrix;
ebasicarray<list<INDTYPE> > inter;
ebasicarray<list<INDTYPE> > incluster;
void check(ebasicarray<eseqdist>& dists);
eseqcluster();
void merge(INDTYPE x,INDTYPE y,float dist);
void init(INDTYPE count,const estr& ofile,const estr& seqsfile,const earray<ebasicarray<INDTYPE> >& dupslist);
void add(const eseqdist& sdist);
void save(const estr& filename,const estrarray& arr);
};
#endif