3 * \brief A hash table for counting the number of sort networks.
5 * This is more details about what this file does.
8 * libsortnetwork - src/sn_hashtable.h
9 * Copyright (C) 2011 Florian octo Forster
11 * This library is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation; either version 2.1 of the License, or (at
14 * your option) any later version.
16 * This library is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this library; if not, write to the Free Software Foundation,
23 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 * Florian octo Forster <ff at octo.it>
30 #ifndef SN_HASHTABLE_H
31 #define SN_HASHTABLE_H 1
36 #include "sn_network.h"
38 struct sn_hashtable_s;
39 typedef struct sn_hashtable_s sn_hashtable_t;
41 sn_hashtable_t *sn_hashtable_create (void);
42 void sn_hashtable_destroy (sn_hashtable_t *ht);
44 int sn_hashtable_account (sn_hashtable_t *ht, const sn_network_t *n);
46 uint64_t sn_hashtable_get_collisions (sn_hashtable_t *ht);
47 double sn_hashtable_get_collisions_pct (sn_hashtable_t *ht);
48 uint64_t sn_hashtable_get_networks (sn_hashtable_t *ht);
49 double sn_hashtable_get_networks_pct (sn_hashtable_t *ht);
50 uint64_t sn_hashtable_get_total (sn_hashtable_t *ht);
52 #endif /* SN_HASHTABLE_H */
53 /* vim: set sw=2 sts=2 et fdm=marker : */