The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 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 30.06.2010
6  * @mail webmaster@BioKom.info
7  *
8  * System: C++
9  *
10  * This header specifies a class for a two 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 two dimensional range datapoint.
28  * A range datapoint (x, y,{minZ, maxZ}) contains a x, a y and an z area
29  * {minZ, maxZ} of values in which the z value of the datapoint lays.
30  *
31  */
32 /*
33 History:
34 30.06.2010 Oesterholz created
35 */
36 
37 #ifndef ___N_D_2_C_DATA_POINT_RANGE_H__
38 #define ___N_D_2_C_DATA_POINT_RANGE_H__
39 
40 #include "version.h"
41 
42 
43 namespace fib{
44 
45 namespace algorithms{
46 
47 namespace nD2{
48 
49 
50 template <class tX, class tY, class tZ>
52 public:
53 
54  /**
55  * The x value for the datapoint.
56  */
57  tX x;
58 
59  /**
60  * The y value for the datapoint.
61  */
62  tY y;
63 
64  /**
65  * The minimal y value for the datapoint.
66  */
67  tZ minZ;
68 
69  /**
70  * The maximal y value for the datapoint.
71  */
72  tZ maxZ;
73 
74  /**
75  * standardconstructor for a range datapoint
76  *
77  * @param inX the @see x value for the datapoint
78  * @param inY the @see y value for the datapoint
79  * @param inMinZ the @see minZ value for the datapoint
80  * @param inMaxZ the @see maxZ value for the datapoint
81  */
82  cDataPointRange( tX inX = 0, tY inY = 0, tZ inMinZ = 0, tZ inMaxZ = 0 );
83 
84  /**
85  * @return the diffence betwean the minimal and maximal z value
86  * @see minZ
87  * @see maxZ
88  */
89  tZ diff() const;
90 
91  /**
92  * This method evalues the distance to an oter datapoint.
93  * The distance is the euclidean distance:
94  * ((x - dataPoint.x)^2 + (y - dataPoint.x)^2)^(1/2)
95  *
96  * @param dataPoint the datapoint to which the distance in the x
97  * and y value should be evalued
98  * @return the euclidean distance of this datapoint and the given datapoint
99  * @see x
100  * @see y
101  */
102  tX dist( const cDataPointRange<tX, tY, tZ> & dataPoint ) const;
103 
104 };
105 
106 
107 };//end namespace nD2
108 };//end namespace algorithms
109 };//end namespace fib
110 
111 //include template implementation
112 #include "../nD2/src/cDataPointRange.cpp"
113 
114 
115 #endif //___N_D_2_C_DATA_POINT_RANGE_H__