pub struct GOVMPH {
pub size: u64,
pub multiplier: u64,
pub global_seed: u64,
pub edge_offset_and_seed: Vec<u64>,
pub array: Vec<u64>,
}
Expand description
A stub to load and access Genuzio-Ottaviano-Vigna minimal perfect hash functions.
To generate the structure you must use the Java version:
java it.unimi.dsi.sux4j.mph.GOVMinimalPerfectHashFunction --byte-array SOURCE test.mph
To obtain a file that can be read by this structure, load the serialized Java instance of the minimal perfect hash function and dump it in C-compatible format:
echo '((it.unimi.dsi.sux4j.mph.GOVMinimalPerfectHashFunction)it.unimi.dsi.fastutil.io.BinIO.loadObject("test.mph")).dump("test.cmph");' | jshell
You can now load the dumped file with the load
method.
Reference:
Fields§
§size: u64
§multiplier: u64
§global_seed: u64
§edge_offset_and_seed: Vec<u64>
§array: Vec<u64>
Implementations§
Trait Implementations§
source§impl SwhidMphf for GOVMPH
impl SwhidMphf for GOVMPH
fn load(basepath: impl AsRef<Path>) -> Result<Self>where Self: Sized,
source§fn hash_str(&self, swhid: impl AsRef<str>) -> Option<NodeId>
fn hash_str(&self, swhid: impl AsRef<str>) -> Option<NodeId>
Hashes a SWHID’s textual representation
source§fn hash_str_array(&self, swhid: &[u8; 50]) -> Option<NodeId>
fn hash_str_array(&self, swhid: &[u8; 50]) -> Option<NodeId>
Hashes a SWHID’s textual representation
Auto Trait Implementations§
impl RefUnwindSafe for GOVMPH
impl Send for GOVMPH
impl Sync for GOVMPH
impl Unpin for GOVMPH
impl UnwindSafe for GOVMPH
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere U: CastableFrom<T>,
§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere U: DowncastableFrom<T>,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere T: ?Sized,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.