ARB
Main Page
Namespaces
Classes
Files
File List
File Members
NALIGNER
ali_pathmap.hxx
Go to the documentation of this file.
1
// =============================================================== //
2
// //
3
// File : ali_pathmap.hxx //
4
// Purpose : //
5
// //
6
// Institute of Microbiology (Technical University Munich) //
7
// http://www.arb-home.de/ //
8
// //
9
// =============================================================== //
10
11
#ifndef ALI_PATHMAP_HXX
12
#define ALI_PATHMAP_HXX
13
14
#ifndef ALI_TARRAY_HXX
15
#include "
ali_tarray.hxx
"
16
#endif
17
18
#define ALI_UNDEF 0x00
19
#define ALI_LEFT 0x01
20
#define ALI_DIAG 0x02
21
#define ALI_UP 0x04
22
#define ALI_LUP 0x08
23
24
// Structure for a long up pointer (a multi gap)
25
struct
ali_pathmap_up_pointer
{
26
unsigned
long
start
;
27
unsigned
char
operation
;
28
};
29
30
class
ALI_PATHMAP
:
virtual
Noncopyable
{
31
unsigned
long
width, height;
32
unsigned
long
height_real;
33
unsigned
char
**pathmap;
34
ALI_TARRAY<ali_pathmap_up_pointer>
****up_pointers;
35
unsigned
char
**optimized;
36
37
public
:
38
39
ALI_PATHMAP
(
unsigned
long
width,
unsigned
long
height);
40
~ALI_PATHMAP
();
41
42
void
set
(
unsigned
long
x,
unsigned
long
y
,
unsigned
char
val,
ALI_TARRAY<ali_pathmap_up_pointer>
*up_pointer =
NULp
);
43
void
get
(
unsigned
long
x,
unsigned
long
y
,
unsigned
char
*val,
ALI_TARRAY<ali_pathmap_up_pointer>
**up_pointer);
44
unsigned
char
get_value
(
unsigned
long
x,
unsigned
long
y) {
45
if
(x >= width || y >= height)
46
ali_fatal_error
(
"Out of range"
,
"ALI_PATHMAP::get_value()"
);
47
if
(y & 0x01)
48
return
(*pathmap)[x*height_real + y/2] & 0x0f;
49
else
50
return
(*pathmap)[x*height_real + y/2] >> 4;
51
}
52
void
optimize
(
unsigned
long
x);
53
void
print
();
54
};
55
56
#else
57
#error ali_pathmap.hxx included twice
58
#endif // ALI_PATHMAP_HXX
ali_pathmap_up_pointer::start
unsigned long start
Definition:
ali_pathmap.hxx:26
y
static char * y[maxsp+1]
Definition:
arb_dnarates.cxx:80
ALI_PATHMAP
Definition:
ali_pathmap.hxx:30
ali_tarray.hxx
ALI_PATHMAP::set
void set(unsigned long x, unsigned long y, unsigned char val, ALI_TARRAY< ali_pathmap_up_pointer > *up_pointer=NULp)
Definition:
ali_pathmap.cxx:36
ALI_PATHMAP::ALI_PATHMAP
ALI_PATHMAP(unsigned long width, unsigned long height)
Definition:
ali_pathmap.cxx:13
ali_pathmap_up_pointer::operation
unsigned char operation
Definition:
ali_pathmap.hxx:27
ALI_PATHMAP::print
void print()
Definition:
ali_pathmap.cxx:125
ALI_PATHMAP::optimize
void optimize(unsigned long x)
Definition:
ali_pathmap.cxx:92
ali_pathmap_up_pointer
Definition:
ali_pathmap.hxx:25
ALI_PATHMAP::~ALI_PATHMAP
~ALI_PATHMAP()
Definition:
ali_pathmap.cxx:24
ali_fatal_error
void ali_fatal_error(const char *message, const char *func)
Definition:
ali_main.cxx:85
ALI_PATHMAP::get_value
unsigned char get_value(unsigned long x, unsigned long y)
Definition:
ali_pathmap.hxx:44
NULp
#define NULp
Definition:
cxxforward.h:114
ALI_TARRAY< ali_pathmap_up_pointer >
Noncopyable
Definition:
arbtools.h:39
Generated by
1.8.8