Lolly
1.4.28
Loading...
Searching...
No Matches
Kernel
Containers
hashfunc.ipp
Go to the documentation of this file.
1
2
/******************************************************************************
3
* MODULE : hashfunc.cpp
4
* DESCRIPTION: fixed size hashfuncs with reference counting
5
* COPYRIGHT : (C) 1999 Joris van der Hoeven
6
*******************************************************************************
7
* This software falls under the GNU general public license version 3 or later.
8
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
9
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10
******************************************************************************/
11
12
#ifndef HASHFUNC_CC
13
#define HASHFUNC_CC
14
#include "
hashfunc.hpp
"
15
16
template
<
class
T,
class
U>
17
U
18
hashfunc_rep<T, U>::apply
(T x) {
19
if
(remember->contains (x))
return
remember[x];
20
U y = func (x);
21
remember (x)= y;
22
return
y;
23
}
24
25
#endif
// defined HASHFUNC_CC
hashfunc_rep::apply
U apply(T x)
Applies the hash function to the given input.
Definition
hashfunc.ipp:18
hashfunc.hpp
Generated by
1.10.0