File: Block.h

package info (click to toggle)
proda 1.0-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 584 kB
  • sloc: cpp: 8,549; xml: 163; makefile: 109; sh: 12
file content (46 lines) | stat: -rw-r--r-- 1,054 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
41
42
43
44
45
46
//////////////////////////////////////////////////////////////////////
// Block.h
//
// Interface for block class
//////////////////////////////////////////////////////////////////////

#ifndef BLOCK_H
#define BLOCK_H
#include <vector>
#include "Types.h"

class MultiSequence;
class Block  
{
	std::vector<Fragment> frags;
public:
	int part;
	Fragment seed;

	//Remove fragments already present in blocks
	int AdjustAFragmentList(AVECT &fragments, Matrix *similarity=NULL, float threshold=0);
	int AdjustAFragmentList(AVECT &fragments, int numSeq, Matrix *similarity=NULL, float threshold=0);

	//Add a fragment to block
	void AddFragment(Fragment &fr);

	//Getters
	int GetLength();
	int size();

	//Printing utility
	void PrintBlock(FILE *f, MultiSequence *seqs, int compare = 0);

	//Block operator
	Fragment& operator [](int i);
	Block& operator=(const Block &bl);
	
	//Constructors
	Block();
	Block(std::vector<AlignedFragment>& afrags, MultiSequence *seqs, 
					bool enableTransitivity, Block *prohibited = NULL);
	virtual ~Block();
	
};

#endif