Lolly 1.4.27
Loading...
Searching...
No Matches
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
16template <class T, class U>
17U
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
U apply(T x)
Applies the hash function to the given input.
Definition hashfunc.ipp:18