GestureRecognitionToolkit
Version: 0.1.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
IndexedDouble.h
1
/*
2
GRT MIT License
3
Copyright (c) <2012> <Nicholas Gillian, Media Lab, MIT>
4
5
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
6
and associated documentation files (the "Software"), to deal in the Software without restriction,
7
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
9
subject to the following conditions:
10
11
The above copyright notice and this permission notice shall be included in all copies or substantial
12
portions of the Software.
13
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
18
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
*/
20
21
#ifndef GRT_INDEXED_DOUBLE_HEADER
22
#define GRT_INDEXED_DOUBLE_HEADER
23
24
GRT_BEGIN_NAMESPACE
25
26
class
IndexedDouble
{
27
public
:
28
IndexedDouble
(){
29
index = 0;
30
value = 0;
31
}
32
IndexedDouble
(
unsigned
int
index,
double
value){
33
this->index = index;
34
this->value = value;
35
}
36
IndexedDouble
(
const
IndexedDouble
&rhs){
37
this->index = rhs.index;
38
this->value = rhs.value;
39
}
40
~
IndexedDouble
(){}
41
42
IndexedDouble
& operator= (
const
IndexedDouble
&rhs){
43
if
(
this
!= &rhs){
44
this->index = rhs.index;
45
this->value = rhs.value;
46
}
47
return
*
this
;
48
}
49
50
static
bool
sortIndexedDoubleByIndexDescending(
IndexedDouble
a,
IndexedDouble
b){
51
return
a.index > b.index;
52
}
53
54
static
bool
sortIndexedDoubleByIndexAscending(
IndexedDouble
a,
IndexedDouble
b){
55
return
a.index < b.index;
56
}
57
58
static
bool
sortIndexedDoubleByValueDescending(
IndexedDouble
a,
IndexedDouble
b){
59
return
a.value > b.value;
60
}
61
62
static
bool
sortIndexedDoubleByValueAscending(
IndexedDouble
a,
IndexedDouble
b){
63
return
a.value < b.value;
64
}
65
66
unsigned
int
index;
67
double
value;
68
};
69
70
GRT_END_NAMESPACE
71
72
#endif //GRT_INDEXED_DOUBLE_HEADER
IndexedDouble
Definition:
IndexedDouble.h:26
GRT
Util
IndexedDouble.h
Generated on Sun Feb 21 2016 20:06:26 for GestureRecognitionToolkit by
1.8.11