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
cDataPoint.h
Go to the documentation of this file.
1 /**
2  * @file cDataPoint
3  * file name: cDataPoint.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 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 datapoint.
28  * A datapoint (x,y) is contains a x and an y value.
29  *
30  */
31 /*
32 History:
33 07.06.2010 Oesterholz created
34 */
35 
36 #ifndef ___N_D_1_C_DATA_POINT_H__
37 #define ___N_D_1_C_DATA_POINT_H__
38 
39 #include "version.h"
40 
41 
42 namespace fib{
43 
44 namespace algorithms{
45 
46 namespace nD1{
47 
48 
49 template <class tX, class tY>
50 class cDataPoint{
51 public:
52 
53  /**
54  * The x value for the datapoint.
55  */
56  tX x;
57 
58  /**
59  * The y value for the datapoint.
60  */
61  tY y;
62 
63  /**
64  * standardconstructor for a datapoint
65  *
66  * @param inX the @see x value for the datapoint
67  * @param inY the @see y value for the datapoint
68  */
69  cDataPoint( tX inX = 0, tY inY = 0 );
70 
71  /**
72  * @param dataPoint the datapoint to which the distance in the x value
73  * should be evalued
74  * @return the distance of the x value of this datapoint and the given datapoint
75  * @see x
76  */
77  tX dist( const cDataPoint<tX, tY> & dataPoint ) const;
78 
79 
80  /**
81  * @param dataPoint the datapoint to compare this datapoint with
82  * @return true if the given datapoint is equal to this, else false
83  * (@see x, @see y)
84  */
85  bool operator==( const cDataPoint<tX, tY> & dataPoint ) const;
86 
87  /**
88  * @param dataPoint the datapoint to compare this datapoint with
89  * @return true if the given datapoint is not equal to this, else false
90  * (@see x, @see y)
91  */
92  bool operator!=( const cDataPoint<tX, tY> & dataPoint ) const;
93 
94  /**
95  * @param dataPoint the datapoint to compare this datapoint with
96  * @return true if the x element of the this datapoint is lower or,
97  * if the x elements of this and the given datapoint are equal, true
98  * if the y element of this datapoint is lower, else false
99  * (@see x, @see y)
100  */
101  bool operator<( const cDataPoint<tX, tY> & dataPoint ) const;
102 
103 };
104 
105 
106 };//end namespace nD1
107 };//end namespace algorithms
108 };//end namespace fib
109 
110 
111 //include template implementation
112 #include "../src/cDataPoint.cpp"
113 
114 
115 #endif //___N_D_1_C_DATA_POINT_H__