Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void QuadraticHashTable<HashedObj>::insert( const HashedObj & x )
- {
- // Insert x as active
- int currentPos = findPos( x.portNum );
- if( isActive( currentPos ) )
- return;
- array[ currentPos ] = HashEntry( x.portNum, ACTIVE );
- // Rehash; see Section 5.5
- if( ++currentSize > array.size( ) / 2 )
- rehash( );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement