ATLAS Offline Software
Loading...
Searching...
No Matches
FSmap< _Key, _Tp > Class Template Reference

#include <FSmap.h>

Inheritance diagram for FSmap< _Key, _Tp >:
Collaboration diagram for FSmap< _Key, _Tp >:

Public Types

typedef _Key key_type
typedef std::map< _Key, _Tp >::iterator iterator
typedef std::map< _Key, _Tp >::const_iterator const_iterator

Public Member Functions

const_iterator find_closest (const key_type &k) const
iterator find_closest (const key_type &k)

Public Attributes

keys
 STL member.
elements
 STL member.

Detailed Description

template<class _Key, class _Tp>
class FSmap< _Key, _Tp >

Definition at line 11 of file FSmap.h.

Member Typedef Documentation

◆ const_iterator

template<class _Key, class _Tp>
typedef std::map<_Key,_Tp>::const_iterator FSmap< _Key, _Tp >::const_iterator

Definition at line 15 of file FSmap.h.

◆ iterator

template<class _Key, class _Tp>
typedef std::map<_Key,_Tp>::iterator FSmap< _Key, _Tp >::iterator

Definition at line 14 of file FSmap.h.

◆ key_type

template<class _Key, class _Tp>
typedef _Key FSmap< _Key, _Tp >::key_type

Definition at line 13 of file FSmap.h.

Member Function Documentation

◆ find_closest() [1/2]

template<class _Key, class _Tp>
iterator FSmap< _Key, _Tp >::find_closest ( const key_type & k)
inline

Definition at line 32 of file FSmap.h.

32 {
36 --i;
37 return i;
38 }
39 if(i==std::map< _Key , _Tp >::begin()) return i;
40
42 --il;
43
44 if( fabs(il->first - k) > fabs(i->first - k) ) return i;
45 else return il;
46 };
Definition FSmap.h:11
std::map< _Key, _Tp >::iterator iterator
Definition FSmap.h:14

◆ find_closest() [2/2]

template<class _Key, class _Tp>
const_iterator FSmap< _Key, _Tp >::find_closest ( const key_type & k) const
inline

Definition at line 17 of file FSmap.h.

17 {
21 --i;
22 return i;
23 }
24 if(i==std::map< _Key , _Tp >::begin()) return i;
25
27 --il;
28
29 if( fabs(il->first - k) > fabs(i->first - k) ) return i;
30 else return il;
31 };
std::map< _Key, _Tp >::const_iterator const_iterator
Definition FSmap.h:15

Member Data Documentation

◆ elements

T std::map< K, T >::elements
inherited

STL member.

◆ keys

K std::map< K, T >::keys
inherited

STL member.


The documentation for this class was generated from the following file: