Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

hash2_table.c File Reference

#include <volume_io/internal_volume_io.h>
#include <bicpl/data_structures.h>

Include dependency graph for hash2_table.c:

Include dependency graph

Go to the source code of this file.

Defines

#define HASH1_FUNCTION_CONSTANT   0.6180339887498948482
#define HASH2_FUNCTION_CONSTANT   0.2794536923672642321

Functions

public void initialize_hash2_table (hash2_table_struct *hash_table, int size, int data_size, Real enlarge_threshold, Real new_density)
private void delete_hash2_table_list (hash2_table_struct *hash_table)
public void delete_hash2_table (hash2_table_struct *hash_table)
private int hash2_function (hash2_table_struct *hash_table, int key1, int key2)
private hash2_entry_struct ** lookup (hash2_table_struct *hash_table, int key1, int key2)
public void insert_in_hash2_table (hash2_table_struct *hash_table, int key1, int key2, void *data_ptr)
public BOOLEAN lookup_in_hash2_table (hash2_table_struct *hash_table, int key1, int key2, void *data_ptr)
public BOOLEAN remove_from_hash2_table (hash2_table_struct *hash_table, int key1, int key2, void *data_ptr)
private void move_hash2_entries_to_new_table (hash2_table_struct *dest, hash2_table_struct *src)
public void increase_hash2_table_size (hash2_table_struct *hash_table, int new_size)
public void initialize_hash2_pointer (hash2_table_pointer *ptr)
public BOOLEAN get_next_hash2_entry (hash2_table_struct *hash_table, hash2_table_pointer *ptr, void *data_ptr)


Define Documentation

#define HASH1_FUNCTION_CONSTANT   0.6180339887498948482
 

Definition at line 22 of file hash2_table.c.

Referenced by hash2_function().

#define HASH2_FUNCTION_CONSTANT   0.2794536923672642321
 

Definition at line 23 of file hash2_table.c.

Referenced by hash2_function().


Function Documentation

public void delete_hash2_table hash2_table_struct hash_table  ) 
 

Definition at line 96 of file hash2_table.c.

References delete_hash2_table_list(), hash2_entry_struct::next, hash2_table_struct::size, and hash2_table_struct::table.

Referenced by intersect_planes_with_polygons(), and intersect_planes_with_quadmesh().

private void delete_hash2_table_list hash2_table_struct hash_table  ) 
 

Definition at line 76 of file hash2_table.c.

References hash2_table_struct::size, and hash2_table_struct::table.

Referenced by delete_hash2_table(), and increase_hash2_table_size().

public BOOLEAN get_next_hash2_entry hash2_table_struct hash_table,
hash2_table_pointer ptr,
void *  data_ptr
 

Definition at line 455 of file hash2_table.c.

References hash2_table_pointer::current_entry, hash2_table_pointer::current_index, hash2_entry_struct::data, hash2_table_struct::data_size, hash2_entry_struct::next, hash2_table_struct::size, and hash2_table_struct::table.

private int hash2_function hash2_table_struct hash_table,
int  key1,
int  key2
 

Definition at line 133 of file hash2_table.c.

References HASH1_FUNCTION_CONSTANT, HASH2_FUNCTION_CONSTANT, and hash2_table_struct::size.

Referenced by lookup(), and move_hash2_entries_to_new_table().

public void increase_hash2_table_size hash2_table_struct hash_table,
int  new_size
 

Definition at line 402 of file hash2_table.c.

References hash2_table_struct::data_size, delete_hash2_table_list(), hash2_table_struct::enlarge_threshold, initialize_hash2_table(), move_hash2_entries_to_new_table(), and hash2_table_struct::new_density.

Referenced by insert_in_hash2_table().

public void initialize_hash2_pointer hash2_table_pointer ptr  ) 
 

Definition at line 433 of file hash2_table.c.

References hash2_table_pointer::current_entry, and hash2_table_pointer::current_index.

public void initialize_hash2_table hash2_table_struct hash_table,
int  size,
int  data_size,
Real  enlarge_threshold,
Real  new_density
 

Definition at line 42 of file hash2_table.c.

References hash2_table_struct::data_size, hash2_table_struct::enlarge_threshold, hash2_table_struct::n_entries, hash2_table_struct::new_density, hash2_table_struct::size, and hash2_table_struct::table.

Referenced by increase_hash2_table_size(), intersect_planes_with_polygons(), and intersect_planes_with_quadmesh().

public void insert_in_hash2_table hash2_table_struct hash_table,
int  key1,
int  key2,
void *  data_ptr
 

Definition at line 200 of file hash2_table.c.

References hash2_entry_struct::data, hash2_table_struct::data_size, hash2_table_struct::enlarge_threshold, increase_hash2_table_size(), hash2_entry_struct::key1, hash2_entry_struct::key2, lookup(), hash2_table_struct::n_entries, hash2_table_struct::new_density, hash2_entry_struct::next, and hash2_table_struct::size.

Referenced by intersect_planes_with_polygons(), and intersect_planes_with_quadmesh().

private hash2_entry_struct** lookup hash2_table_struct hash_table,
int  key1,
int  key2
 

Definition at line 165 of file hash2_table.c.

References hash2_function(), hash2_entry_struct::next, and hash2_table_struct::table.

Referenced by check_voxel_for_boundary(), check_voxel_for_isovalue(), delete_lookup_volume_coeficients(), fast_approx_sqrt(), find_boundary_in_direction(), initialize_lookup_volume_coeficients(), and lookup_volume_coeficients().

public BOOLEAN lookup_in_hash2_table hash2_table_struct hash_table,
int  key1,
int  key2,
void *  data_ptr
 

Definition at line 260 of file hash2_table.c.

References hash2_entry_struct::data, hash2_table_struct::data_size, FALSE, lookup(), and TRUE.

Referenced by intersect_planes_with_polygons(), and intersect_planes_with_quadmesh().

private void move_hash2_entries_to_new_table hash2_table_struct dest,
hash2_table_struct src
 

Definition at line 359 of file hash2_table.c.

References hash2_function(), hash2_entry_struct::key1, hash2_entry_struct::key2, hash2_table_struct::n_entries, hash2_entry_struct::next, hash2_table_struct::size, and hash2_table_struct::table.

Referenced by increase_hash2_table_size().

public BOOLEAN remove_from_hash2_table hash2_table_struct hash_table,
int  key1,
int  key2,
void *  data_ptr
 

Definition at line 308 of file hash2_table.c.

References hash2_entry_struct::data, hash2_table_struct::data_size, FALSE, lookup(), hash2_table_struct::n_entries, hash2_entry_struct::next, and TRUE.


Generated on Wed Jul 28 09:11:06 2004 for BICPL by doxygen 1.3.7