The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
cDataPointRange.h
Go to the documentation of this file.
1
/**
2
* @file cDataPointRange
3
* file name: cDataPointRange.h
4
* @author Betti Oesterholz
5
* @date 07.06.2010
6
* @mail webmaster@BioKom.info
7
*
8
* System: C++
9
*
10
* This header specifies a class for a one dimensional range datapoint.
11
* Copyright (C) @c GPL3 2010 Betti Oesterholz
12
*
13
* This program is free software: you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License (GPL) as
15
* published by the Free Software Foundation, either version 3 of the
16
* License, or any later version.
17
*
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU Lesser General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
*
26
*
27
* This header specifies a class for a one dimensional range datapoint.
28
* A range datapoint (x,{minY, maxY}) contains a x and an y area
29
* {minY, maxY} of values in which the y value of the datapoint lays.
30
*
31
*/
32
/*
33
History:
34
07.06.2010 Oesterholz created
35
22.02.2011 Oesterholz equal() method added
36
30.06.2011 Oesterholz operator<() added
37
*/
38
39
#ifndef ___N_D_1_C_DATA_POINT_RANGE_H__
40
#define ___N_D_1_C_DATA_POINT_RANGE_H__
41
42
#include "version.h"
43
44
45
namespace
fib{
46
47
namespace
algorithms{
48
49
namespace
nD1{
50
51
52
template
<
class
tX,
class
tY>
53
class
cDataPointRange
{
54
public
:
55
56
/**
57
* The x value for the datapoint.
58
*/
59
tX
x
;
60
61
/**
62
* The minimal y value for the datapoint.
63
*/
64
tY
minY
;
65
66
/**
67
* The maximal y value for the datapoint.
68
*/
69
tY
maxY
;
70
71
/**
72
* standardconstructor for a datapoint
73
*
74
* @param inX the @see x value for the datapoint
75
* @param inMinY the @see minY value for the datapoint
76
* @param inMaxY the @see maxY value for the datapoint
77
*/
78
cDataPointRange
( tX inX = 0, tY inMinY = 0, tY inMaxY = 0 );
79
80
/**
81
* @return the diffence betwean the minimal and maximal y value
82
* @see minY
83
* @see maxY
84
*/
85
tY
diff
()
const
;
86
87
/**
88
* @param dataPoint the datapoint to which the distance in the x value
89
* should be evalued
90
* @return the distance of the x value of this datapoint and the given datapoint
91
* @see x
92
*/
93
tX
dist
(
const
cDataPointRange<tX, tY>
& dataPoint )
const
;
94
95
/**
96
* @param dataPoint the range data point to compare with this
97
* @return true if this range data point is equal to the given range
98
* data point, else false
99
*/
100
bool
equal
(
const
cDataPointRange<tX, tY>
& dataPoint )
const
;
101
102
/**
103
* @param dataPoint the datapoint to compare this datapoint with
104
* @return true if the x element of the this datapoint is lower or,
105
* if the x elements of this and the given datapoint are equal, true
106
* if the minY element of this datapoint is lower, else if the also
107
* the minY elements of this and the given datapoint are equal, true
108
* if the maxY element of this datapoint is lower,
109
* (@see x, @see minY, @see maxY)
110
*/
111
bool
operator<( const cDataPointRange<tX, tY> & dataPoint )
const
;
112
113
};
114
115
116
};
//end namespace nD1
117
};
//end namespace algorithms
118
};
//end namespace fib
119
120
//include template implementation
121
#include "../nD1/src/cDataPointRange.cpp"
122
123
124
#endif //___N_D_1_C_DATA_POINT_RANGE_H__
fib.algorithms
nD1
incl
cDataPointRange.h
Generated on Thu Feb 14 2013 14:06:55 for The Fib multimedia system by
1.8.1