comparison core/tools/NaiveHash.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 classdef NaiveHash < handle
2
3 properties
4
5 last_key = 0;
6 map;
7 end
8
9 % ---
10 % the methods
11 % ---
12 methods
13 function ht = NaiveHash(data)
14
15 ht.Map = containers.Map('KeyType', 'int32', 'ValueType', 'int32');
16 end
17
18 function put(ht, data)
19
20 % get new key
21 last_key = last_key + 1;
22 ticketMap(data) = last_key;
23 end
24
25 function data(ht, data)
26
27 end
28
29 function out = key(ht, data)
30
31 out = ht.Map(data);
32 end
33
34 function iskey(ht, key)
35
36 end
37
38 end
39
40 end