OverSim
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
SimpleCoordDataContainer.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2010 Institut fuer Telematik, Universitaet Karlsruhe (TH)
3
//
4
// This program is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU General Public License
6
// as published by the Free Software Foundation; either version 2
7
// of the License, or (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
//
18
24
#ifndef SIMPLECOORDINATE_H_
25
#define SIMPLECOORDINATE_H_
26
27
#include <
oversim_mapset.h
>
28
#include <math.h>
29
#include <cstddef>
30
#include <vector>
31
32
class
SimpleCoordinate
{
33
34
public
:
38
class
hashFcn
39
{
40
public
:
41
size_t
operator()
(
const
SimpleCoordinate
& h1 )
const
42
{
43
return
h1.
hash
();
44
}
45
};
46
47
SimpleCoordinate
();
48
virtual
~SimpleCoordinate
();
49
54
bool
operator<
(
const
SimpleCoordinate
& compSimpleCoordinate )
const
;
55
60
bool
operator>
(
const
SimpleCoordinate
& compSimpleCoordinate )
const
;
61
62
67
bool
operator==
(
const
SimpleCoordinate
& compSimpleCoordinate )
const
;
68
72
size_t
hash
()
const
;
73
74
std::vector<int>
coordData
;
75
76
protected
:
77
84
int
compareTo
(
const
SimpleCoordinate
& compSimpleCoordinate)
const
;
85
86
};
87
88
#endif
/* SIMPLECOORDINATE_H_ */
89
90
91
92
#ifndef SIMPLECOORDDATACONTAINER_H_
93
#define SIMPLECOORDDATACONTAINER_H_
94
95
class
SimpleCoordDataContainer
{
96
97
public
:
98
SimpleCoordDataContainer
();
99
virtual
~SimpleCoordDataContainer
();
100
101
typedef
UNORDERED_MAP<SimpleCoordinate, int, SimpleCoordinate::hashFcn>
simpleCoordCountMap
;
102
103
simpleCoordCountMap
coordData
;
104
109
int
getBitLength
();
110
111
};
112
113
#endif
/* SIMPLECOORDDATACONTAINER_H_ */
src
common
cbr
globalViewBuilder
SimpleCoordDataContainer.h
Generated on Fri Dec 7 2012 13:37:53 for OverSim by
1.8.1.2