[−][src]Struct tab_hash::Tab64Simple
A universal hash function for 64-bit integers using simple tabulation.
Usage:
use tab_hash::Tab64Simple; fn main() { let keys = vec![0, 8, 15, 47, 11]; let simple = Tab64Simple::new(); for k in keys { println!("{}", simple.hash(k)); } }
Methods
impl Tab64Simple[src]
pub fn new() -> Self[src]
Create a new simple tabulation hash function with a random table.
pub fn with_table(table: [[u64; 256]; 8]) -> Self[src]
Create a new simple tabulation hash function with a given table.
pub fn get_table(&self) -> [[u64; 256]; 8][src]
Get the table used by this hash function.
pub fn hash(&self, x: u64) -> u64[src]
Compute simple tabulation hash value for a 64bit integer number.
Auto Trait Implementations
impl Send for Tab64Simple
impl Sync for Tab64Simple
impl Unpin for Tab64Simple
impl UnwindSafe for Tab64Simple
impl RefUnwindSafe for Tab64Simple
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,