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 LoadableSwhidMphf for GOVMPH
impl LoadableSwhidMphf for GOVMPH
type WithMappedPermutation = PermutedMphf<GOVMPH, MappedPermutation>
fn load(basepath: impl AsRef<Path>) -> Result<Self>where
Self: Sized,
Source§fn with_mapped_permutation(
self,
basepath: impl AsRef<Path>,
) -> Result<Self::WithMappedPermutation>
fn with_mapped_permutation( self, basepath: impl AsRef<Path>, ) -> Result<Self::WithMappedPermutation>
Given the base path of the MPH, mmaps the associated .order file and returns it
Source§impl SwhidMphf for GOVMPH
impl SwhidMphf for GOVMPH
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 Freeze for GOVMPH
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
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.