• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* -*-C-*-
2  ********************************************************************************
3  *
4  * File:        closed.h  (Formerly closed.h)
5  * Description:  Hash table for closed search states.
6  * Author:       Mark Seaman, SW Productivity
7  * Created:      Fri Oct 16 14:37:00 1987
8  * Modified:     Fri May 25 11:27:11 1990 (Mark Seaman) marks@hpgrlt
9  * Language:     C
10  * Package:      N/A
11  * Status:       Reusable Software Component
12  *
13  * (c) Copyright 1987, Hewlett-Packard Company.
14  ** Licensed under the Apache License, Version 2.0 (the "License");
15  ** you may not use this file except in compliance with the License.
16  ** You may obtain a copy of the License at
17  ** http://www.apache.org/licenses/LICENSE-2.0
18  ** Unless required by applicable law or agreed to in writing, software
19  ** distributed under the License is distributed on an "AS IS" BASIS,
20  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  ** See the License for the specific language governing permissions and
22  ** limitations under the License.
23  *
24  *********************************************************************************/
25 
26 #ifndef CLOSED_H
27 #define CLOSED_H
28 
29 /*----------------------------------------------------------------------
30               I n c l u d e s
31 ----------------------------------------------------------------------*/
32 #include <math.h>
33 #include "states.h"
34 
35 /*----------------------------------------------------------------------
36               T y p e s
37 ----------------------------------------------------------------------*/
38 typedef STATE *HASH_TABLE;
39 #define NO_STATE ~0
40 
41 /*----------------------------------------------------------------------
42               V a r i a b l e s
43 ----------------------------------------------------------------------*/
44 extern HASH_TABLE global_hash;
45 
46 /*----------------------------------------------------------------------
47               M a c r o s
48 ----------------------------------------------------------------------*/
49 /**********************************************************************
50  * free_hash_table
51  *
52  * Free the memory taken by a state variable.
53  **********************************************************************/
54 #define free_hash_table(table) \
55 	global_hash = table
56 
57 /*---------------------------------------------------------------------
58               F u n c t i o n s
59 ----------------------------------------------------------------------*/
60 int hash_add(HASH_TABLE state_table, STATE *state);
61 
62 int hash_lookup(HASH_TABLE state_table, STATE *state);
63 
64 HASH_TABLE new_hash_table();
65 #endif
66