Public Member Functions

IntSet Class Reference

Lightweight hash set class for storing ints Simple hash table with quadratic probing. More...

#include <IntSet.h>

List of all members.

Public Member Functions

 IntSet (int capacity)
int  getSize ()
bool  insert (int x)
bool  find (int x)

Detailed Description

Lightweight hash set class for storing ints Simple hash table with quadratic probing.


Constructor & Destructor Documentation

IntSet::IntSet ( int   capacity  )
Parameters:
[in]capacityInitial maximum size of hash set

Member Function Documentation

bool IntSet::find ( int   x  )

returns whether x is in hash table

Returns:
whether x is in hash table
int IntSet::getSize (  )

returns the number of elements stored in hash table

Returns:
the number of elements stored in hash table
bool IntSet::insert ( int   x  )

inserts x into hash table, returns whether x was inserted

Parameters:
[in]xvalue to insert into set
Returns:
whether x was successfully inserted. If x is already in table, returns false

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Defines