proj home

Files   Classes   Functions   Hierarchy  

bucket< T, HFN > Class Template Reference

#include <bucket.h>

Inheritance diagram for bucket< T, HFN >:
Collaboration diagram for bucket< T, HFN >:

List of all members.

Public Member Functions

 bucket (T *data_, uintc datasz_, HFN fn_)
 Pre allocate memory requirements before use, do not put this class in a loop.
 ~bucket ()
 Cleanup.
void eval ()
 Sort the data.
void copy (T *data2) const
 Extract the result by copying to another vector.

Protected Attributes

Tdata
 The data being sorted.
uintc datasz
 The size of the data.
HFN fn
 The hash function.
bucketlink< T > ** vb
 The buckets.
bucketlink< T > * link
 The data in links.
uint linki
 Points to the next available link.


Detailed Description

template<typename T, typename HFN>
class bucket< T, HFN >

Definition at line 51 of file bucket.h.


Constructor & Destructor Documentation

template<typename T, typename HFN>
bucket< T, HFN >::bucket ( T data_,
uintc  datasz_,
HFN  fn_ 
)

Pre allocate memory requirements before use, do not put this class in a loop.

template<typename T, typename HFN>
bucket< T, HFN >::~bucket (  ) 

Cleanup.


Member Function Documentation

template<typename T, typename HFN>
void bucket< T, HFN >::copy ( T data2  )  const

Extract the result by copying to another vector.

Reimplemented in buckethybrid< T, HFN, C >.

Referenced by buckettest::test01().

template<typename T, typename HFN>
void bucket< T, HFN >::eval (  ) 

Sort the data.

Reimplemented in buckethybrid< T, HFN, C >.

Referenced by buckettest::test01().


Member Data Documentation

template<typename T, typename HFN>
T* bucket< T, HFN >::data [protected]

The data being sorted.

Definition at line 55 of file bucket.h.

Referenced by bucket< T, HFN >::copy(), and bucket< T, HFN >::eval().

template<typename T, typename HFN>
uintc bucket< T, HFN >::datasz [protected]

The size of the data.

Definition at line 57 of file bucket.h.

Referenced by bucket< T, HFN >::eval().

template<typename T, typename HFN>
HFN bucket< T, HFN >::fn [protected]

The hash function.

Definition at line 59 of file bucket.h.

Referenced by bucket< T, HFN >::copy(), and bucket< T, HFN >::eval().

template<typename T, typename HFN>
bucketlink<T>* bucket< T, HFN >::link [protected]

The data in links.

Definition at line 63 of file bucket.h.

Referenced by bucket< T, HFN >::eval(), and bucket< T, HFN >::~bucket().

template<typename T, typename HFN>
uint bucket< T, HFN >::linki [protected]

Points to the next available link.

Definition at line 65 of file bucket.h.

template<typename T, typename HFN>
bucketlink<T>* * bucket< T, HFN >::vb [protected]

The buckets.

Definition at line 61 of file bucket.h.

Referenced by bucket< T, HFN >::copy(), bucket< T, HFN >::eval(), and bucket< T, HFN >::~bucket().


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

Generated on Fri Mar 4 00:49:51 2011 for Chelton Evans Source by  doxygen 1.5.8