SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
CHashSet Class Reference

Detailed Description

the class HashSet, a set based on the hash-table. w: http://en.wikipedia.org/wiki/Hash_table

Definition at line 43 of file HashSet.h.

Inheritance diagram for CHashSet:
Inheritance graph
[legend]

Public Member Functions

 CHashSet ()
 CHashSet (int32_t size)
virtual const char * get_name () const
virtual ~CHashSet ()
bool insert_key (int32_t key, float64_t data)
bool search_key (int32_t key, float64_t &ret_data)
void delete_key (int32_t key)
void debug ()
- Public Member Functions inherited from CSGObject
 CSGObject ()
 CSGObject (const CSGObject &orig)
virtual ~CSGObject ()
virtual bool is_generic (EPrimitiveType *generic) const
template<class T >
void set_generic ()
void unset_generic ()
virtual void print_serializable (const char *prefix="")
virtual bool save_serializable (CSerializableFile *file, const char *prefix="")
virtual bool load_serializable (CSerializableFile *file, const char *prefix="")
void set_global_io (SGIO *io)
SGIOget_global_io ()
void set_global_parallel (Parallel *parallel)
Parallelget_global_parallel ()
void set_global_version (Version *version)
Versionget_global_version ()
SGVector< char * > get_modelsel_names ()
char * get_modsel_param_descr (const char *param_name)
index_t get_modsel_param_index (const char *param_name)

Protected Attributes

HashSetNode ** hash_array
int32_t array_size

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
Parallelparallel
Versionversion
Parameterm_parameters
Parameterm_model_selection_parameters
- Protected Member Functions inherited from CSGObject
virtual void load_serializable_pre () throw (ShogunException)
virtual void load_serializable_post () throw (ShogunException)
virtual void save_serializable_pre () throw (ShogunException)
virtual void save_serializable_post () throw (ShogunException)

Constructor & Destructor Documentation

CHashSet ( )

Definition at line 16 of file HashSet.cpp.

CHashSet ( int32_t  size)

Constructor for heap with specified size of hash array

Definition at line 22 of file HashSet.cpp.

~CHashSet ( )
virtual

Definition at line 32 of file HashSet.cpp.

Member Function Documentation

void debug ( )

Debug "pretty" print

Definition at line 148 of file HashSet.cpp.

void delete_key ( int32_t  key)

Deletes key from set

Definition at line 118 of file HashSet.cpp.

virtual const char* get_name ( ) const
virtual

Returns the name of the SGSerializable instance. It MUST BE the CLASS NAME without the prefixed `C'.

Returns
name of the SGSerializable

Implements CSGObject.

Definition at line 51 of file HashSet.h.

bool insert_key ( int32_t  key,
float64_t  data 
)

Inserts nodes with certain key and data in set

Definition at line 44 of file HashSet.cpp.

bool search_key ( int32_t  key,
float64_t ret_data 
)

Searchs data by key in set

Definition at line 76 of file HashSet.cpp.

Member Data Documentation

int32_t array_size
protected

size of array

Definition at line 83 of file HashSet.h.

HashSetNode** hash_array
protected

array of lists(chains)

Definition at line 80 of file HashSet.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation